private List <KeyValuePair <IData, IData> > DeserializeList(BinaryReader reader)
        {
            int count = reader.ReadInt32();

            List <KeyValuePair <IData, IData> > list = new List <KeyValuePair <IData, IData> >(count);

            for (int i = 0; i < count; i++)
            {
                IData key = KeyPersist.Read(reader);
                IData rec = RecordPersist.Read(reader);

                list.Add(new KeyValuePair <IData, IData>(key, rec));
            }

            return(list);
        }
 private TryGetCommand ReadTryGetCommand(BinaryReader reader)
 {
     return(new TryGetCommand(KeyPersist.Read(reader), reader.ReadBoolean() ? RecordPersist.Read(reader) : null));
 }
 private InsertOrIgnoreCommand ReadInsertOrIgnoreCommand(BinaryReader reader)
 {
     return(new InsertOrIgnoreCommand(KeyPersist.Read(reader), RecordPersist.Read(reader)));
 }
 private ReplaceCommand ReadReplaceCommand(BinaryReader reader)
 {
     return(new ReplaceCommand(KeyPersist.Read(reader), RecordPersist.Read(reader)));
 }
Beispiel #5
0
 private void WriteInsertOrIgnoreOperation(BinaryWriter writer, InsertOrIgnoreOperation operation)
 {
     KeyPersist.Write(writer, operation.FromKey);
     RecordPersist.Write(writer, operation.Record);
 }
Beispiel #6
0
 private void WriteReplaceOperation(BinaryWriter writer, ReplaceOperation operation)
 {
     KeyPersist.Write(writer, operation.FromKey);
     RecordPersist.Write(writer, operation.Record);
 }