public Deserialize ( |
||
reader | ||
Результат | object |
public override object Read(BinaryReader reader, byte version) { int length = reader.ReadInt32(); var array = new object[length]; for (int i = 0; i < length; i++) { array[i] = StreamerManager.Deserialize(reader); } return(array); }
public override object Read(BinaryReader reader, byte version) { var dateTime = new DateTime(reader.ReadInt64()); return(new OnLoggedIn(dateTime) { UserId = reader.ReadInt32(), UserName = reader.ReadString(), DefaultAlgoId = reader.ReadInt32(), Fields = (ObjectTable)StreamerManager.Deserialize(reader) }); }
public override object Read(BinaryReader reader, byte version) { var list = new ParameterList(); list.Name = reader.ReadString(); int pCount = reader.ReadInt32(); int mCount = reader.ReadInt32(); for (int i = 0; i < pCount; i++) { list.Add(StreamerManager.Deserialize(reader) as Parameter); } for (int j = 0; j < mCount; j++) { list.Methods.Add(reader.ReadString()); } return(list); }
public override object Read(BinaryReader reader, byte version) { var name = reader.ReadString(); var value = StreamerManager.Deserialize(reader); var typeName = reader.ReadString(); int count = reader.ReadInt32(); var attributes = new List <Attribute>(); for (int i = 0; i < count; i++) { var attribute = StreamerManager.Deserialize(reader) as Attribute; if (attribute != null) { attributes.Add(attribute); } } return(new Parameter(name, value, typeName, attributes.ToArray())); }
public override object Read(BinaryReader reader, byte version) { var datetime = new DateTime(reader.ReadInt64()); var type = (AccountDataType)reader.ReadInt32(); var account = reader.ReadString(); var providerId = reader.ReadByte(); var route = reader.ReadByte(); var accountData = new AccountData(datetime, type, account, providerId, route); int count = reader.ReadInt32(); for (int i = 0; i < count; i++) { var name = reader.ReadString(); var currency = reader.ReadString(); object value = StreamerManager.Deserialize(reader); accountData.Fields.Add(name, currency, value); } return(accountData); }
public override object Read(BinaryReader reader, byte version) { var ou = new OnUnsubscribe(); ou.DateTime = new DateTime(reader.ReadInt64()); ou.Symbol = reader.ReadString(); if (version >= 1 && reader.ReadBoolean()) { ou.Subscription = new Subscription { SourceId = reader.ReadInt32(), ProviderId = reader.ReadInt32(), RouteId = reader.ReadInt32(), RequestId = reader.ReadInt32(), Symbol = reader.ReadString(), Instrument = (Instrument)StreamerManager.Deserialize(reader) }; } return(ou); }