public static IResponse Deserialize(IPCReader reader) { var commandData = reader.ReadLengthPrefixedBlob(); using (var uncompresedStream = new MemoryStream()) { using (var inputStream = new MemoryStream(commandData)) using (var dstream = new DeflateStream(inputStream, CompressionMode.Decompress)) dstream.CopyTo(uncompresedStream); uncompresedStream.Seek(0, SeekOrigin.Begin); using (var uncompressedReader = new IPCReader(uncompresedStream)) return(uncompressedReader.ReadResponse()); } }
public static Deploy Deserialize(IPCReader reader) => new Deploy { Data = reader.ReadLengthPrefixedBlob(), Destination = reader.ReadString() };
public static ResultRangeFetched Deserialize(IPCReader reader) => new ResultRangeFetched { Data = reader.ReadLengthPrefixedBlob(), Timestamp = reader.ReadDateTime(), Status = (FetchStatus)reader.ReadByte() };
public static PutFileCommand Deserialize(IPCReader reader) => new PutFileCommand { Data = reader.ReadLengthPrefixedBlob(), Path = reader.ReadString(), WorkDir = reader.ReadString() };