示例#1
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
            });
        }
示例#2
0
 public static ResultRangeFetched Deserialize(IPCReader reader) => new ResultRangeFetched
 {
     Data      = reader.ReadLengthPrefixedBlob(),
     Timestamp = reader.ReadDateTime(),
     Status    = (FetchStatus)reader.ReadByte()
 };
示例#3
0
 public static MetadataFetched Deserialize(IPCReader reader) => new MetadataFetched
 {
     ByteCount = reader.ReadInt32(),
     Timestamp = reader.ReadDateTime(),
     Status    = (FetchStatus)reader.ReadByte()
 };