public override void Write(BinaryWriter writer, object obj) { var ol = (OnLoggedIn)obj; writer.Write(ol.DateTime.Ticks); writer.Write(ol.UserId); writer.Write(ol.UserName); writer.Write(ol.DefaultAlgoId); StreamerManager.Serialize(writer, ol.Fields); }
public override void Write(BinaryWriter writer, object obj) { var array = (object[])obj; writer.Write(array.Length); for (int i = 0; i < array.Length; i++) { StreamerManager.Serialize(writer, array[i]); } }
public override void Write(BinaryWriter writer, object obj) { var p = (Parameter)obj; writer.Write(p.Name); StreamerManager.Serialize(writer, p.Value); writer.Write(p.TypeName); writer.Write(p.Attributes.Length); var attributes = p.Attributes; for (int i = 0; i < attributes.Length; i++) { StreamerManager.Serialize(writer, attributes[i]); } }
public override void Write(BinaryWriter writer, object obj) { var list = (ParameterList)obj; var ps = list.Parameters().Select(p => StreamerManager.HasStreamer(p.Value.GetType())); writer.Write(list.Name); writer.Write(ps.Count()); writer.Write(list.Methods.Count); foreach (var p in ps) { StreamerManager.Serialize(writer, p); } foreach (string m in list.Methods) { writer.Write(m); } }
// Token: 0x060008B1 RID: 2225 RVA: 0x0002EC6C File Offset: 0x0002CE6C public override void Write(BinaryWriter writer, object obj) { var ou = (OnUnsubscribe)obj; writer.Write(ou.DateTime.Ticks); writer.Write(ou.Symbol); if (this.version >= 1) { writer.Write(ou.Subscription != null); if (ou.Subscription != null) { writer.Write(ou.Subscription.SourceId); writer.Write(ou.Subscription.ProviderId); writer.Write(ou.Subscription.RouteId); writer.Write(ou.Subscription.RequestId); writer.Write(ou.Subscription.Symbol); StreamerManager.Serialize(writer, ou.Subscription.Instrument); } } }
public override void Write(BinaryWriter writer, object obj) { var data = (AccountData)obj; writer.Write(data.DateTime.Ticks); writer.Write((int)data.Type); writer.Write(data.Account); writer.Write(data.ProviderId); writer.Write(data.Route); var list = new List <AccountDataField>(); foreach (AccountDataField field in data.Fields) { var type = field.Value.GetType(); if (StreamerManager.HasStreamer(type)) { list.Add(field); } else if (type == typeof(object[])) { var array = (object[])field.Value; for (int i = 0; i < array.Length; i++) { StreamerManager.HasStreamer(array[i].GetType()); } list.Add(field); } } writer.Write(list.Count); foreach (var field in list) { writer.Write(field.Name); writer.Write(field.Currency); StreamerManager.Serialize(writer, field.Value); } }