public static ResponseParameters DecodeResponse(ClientMessage clientMessage) { using var iterator = clientMessage.GetEnumerator(); var response = new ResponseParameters(); iterator.Take(); // empty initial frame response.IterationPointers = EntryListIntegerIntegerCodec.Decode(iterator); response.Keys = ListMultiFrameCodec.Decode(iterator, DataCodec.Decode); return(response); }
public static ResponseParameters DecodeResponse(ClientMessage clientMessage) { var iterator = clientMessage.GetIterator(); var response = new ResponseParameters(); //empty initial frame iterator.Next(); response.Results = ListMultiFrameCodec.DecodeContainsNullable(iterator, DataCodec.Decode); response.IterationPointers = EntryListIntegerIntegerCodec.Decode(iterator); return(response); }
public static RequestParameters DecodeRequest(ClientMessage clientMessage) { using var iterator = clientMessage.GetEnumerator(); var request = new RequestParameters(); var initialFrame = iterator.Take(); request.Batch = initialFrame.Bytes.ReadIntL(RequestBatchFieldOffset); request.Name = StringCodec.Decode(iterator); request.IterationPointers = EntryListIntegerIntegerCodec.Decode(iterator); return(request); }