public override object ReadFrom(LiteBinaryReader reader, object obj) { int length = reader.ReadInt32(); IDictionary dict = (IDictionary)obj; for (int i = 0; i < length; i++) { object key = reader.ReadObject(); object value = reader.ReadObject(); dict.Add(key, value); } return(dict); }
public object Deserialize(Stream stream) { using (LiteBinaryReader reader = new LiteBinaryReader(stream, Encoding.Default, _serializationContext)) { return(reader.ReadObject()); } }
public override object ReadFrom(LiteBinaryReader reader, object obj) { object[] array = (object[])obj; for (int i = 0; i < array.Length; i++) { array[i] = reader.ReadObject(); } return(array); }
public override object ReadFrom(LiteBinaryReader reader, object obj) { Array array = (Array)obj; for (int i = 0; i < array.Length; i++) { array.SetValue(reader.ReadObject(), i); } return(array); }
public override object ReadFrom(LiteBinaryReader reader, object obj) { int length = reader.ReadInt32(); IList list = (IList)obj; for (int i = 0; i < length; i++) { list.Add(reader.ReadObject()); } return(list); }