Ejemplo n.º 1
0
 public static Execute Deserialize(IPCReader reader) => new Execute
 {
     WorkingDirectory     = reader.ReadString(),
     Executable           = reader.ReadString(),
     Arguments            = reader.ReadString(),
     RunAsAdministrator   = reader.ReadBoolean(),
     ExecutionTimeoutSecs = reader.ReadInt32()
 };
Ejemplo n.º 2
0
 public static ExecutionCompleted Deserialize(IPCReader reader) => new ExecutionCompleted
 {
     Status        = (ExecutionStatus)reader.ReadByte(),
     ExitCode      = reader.ReadInt32(),
     Stdout        = reader.ReadString(),
     Stderr        = reader.ReadString(),
     ExecutionTime = reader.ReadInt64(),
 };
Ejemplo n.º 3
0
        public static ListFilesResponse Deserialize(IPCReader reader)
        {
            var length = reader.Read7BitEncodedInt();
            var files  = new FileMetadata[length];

            for (int i = 0; i < length; ++i)
            {
                files[i] = new FileMetadata(reader.ReadString(), reader.ReadInt64(), reader.ReadDateTime());
            }
            return(new ListFilesResponse {
                Files = files
            });
        }
Ejemplo n.º 4
0
 public static Deploy Deserialize(IPCReader reader) => new Deploy
 {
     Data        = reader.ReadLengthPrefixedBlob(),
     Destination = reader.ReadString()
 };
Ejemplo n.º 5
0
 public static GetFilesCommand Deserialize(IPCReader reader) => new GetFilesCommand
 {
     UseCompression = reader.ReadBoolean(),
     RootPath       = reader.ReadString(),
     Paths          = reader.ReadLengthPrefixedStringArray()
 };
Ejemplo n.º 6
0
 public static ListFilesCommand Deserialize(IPCReader reader) => new ListFilesCommand
 {
     Path = reader.ReadString(),
     IncludeSubdirectories = reader.ReadBoolean()
 };
Ejemplo n.º 7
0
 public static PutDirectoryCommand Deserialize(IPCReader reader) => new PutDirectoryCommand
 {
     Files = reader.ReadLengthPrefixedFileArray(),
     Path  = reader.ReadString(),
     PreserveTimestamps = reader.ReadBoolean()
 };
Ejemplo n.º 8
0
 public static PutFileCommand Deserialize(IPCReader reader) => new PutFileCommand
 {
     Data    = reader.ReadLengthPrefixedBlob(),
     Path    = reader.ReadString(),
     WorkDir = reader.ReadString()
 };