private string ReadErrorMessage() { _reader.ReadDictionaryLength(); _reader.ReadUint(); var message = _reader.ReadString(Encoding.UTF8); return(message); }
public override Dictionary <TKey, TValue> Deserialize(MessagePackReader reader) { var dictionary = new Dictionary <TKey, TValue>(); var length = reader.ReadDictionaryLength(); for (var i = 0; i < length; i++) { var key = _keySerializer.Deserialize(reader); var value = _valueSerializer.Deserialize(reader); dictionary.Add(key, value); } return(dictionary); }
public void Deserialize(MessagePackReader reader) { var dictionaryLength = reader.ReadDictionaryLength(); for (var i = 0; i < dictionaryLength; i++) { var key = reader.ReadUint(); switch (key) { case IPROTO_REQUEST_TYPE_KEY: Code = (CommandE)reader.ReadUint(); break; case IPROTO_SYNC_KEY: SyncId = (int)reader.ReadUint(); break; case IPROTO_SCHEMA_VERSION_KEY: SchemaVersion = (int)reader.ReadUint(); break; } } }
protected virtual void ReadBody(MessagePackReader reader) { reader.ReadDictionaryLength(); }