public void Insert(int index, FIXGroup group) { // if (this.Contains(group)) // throw new ApplicationException(Ugjylcah9mCMM4kO7N.tLah92SpBQ(292) + (object) group.Id); this.fList.Insert(index, (object)group); this.fId.Add((object)group.Id, (object)group); }
public static void ReadFrom(BinaryReader reader, FIXGroup group) { int num = reader.ReadInt32(); for (int index = 0; index < num; ++index) { int tag = reader.ReadInt32(); FIXType fixType = EFIXFieldTypes.GetFIXType(tag); switch (fixType) { case FIXType.Bool: group.AddBoolField(tag, reader.ReadBoolean()); break; case FIXType.Int: group.AddIntField(tag, reader.ReadInt32()); break; case FIXType.Double: group.AddDoubleField(tag, reader.ReadDouble()); break; case FIXType.Char: group.AddCharField(tag, reader.ReadChar()); break; case FIXType.String: group.AddStringField(tag, reader.ReadString()); break; case FIXType.DateTime: group.AddDateTimeField(tag, new DateTime(reader.ReadInt64())); break; default: throw new ArgumentException("" + fixType.ToString()); } } }
public static void WriteTo(BinaryWriter writer, FIXGroup group) { writer.Write(group.Fields.Length); foreach (FIXField fixField in group.Fields) { writer.Write(fixField.Tag); switch (fixField.FIXType) { case FIXType.Bool: writer.Write(((FIXBoolField)fixField).Value); break; case FIXType.Int: writer.Write(((FIXIntField)fixField).Value); break; case FIXType.Double: writer.Write(((FIXDoubleField)fixField).Value); break; case FIXType.Char: writer.Write(((FIXCharField)fixField).Value); break; case FIXType.String: writer.Write(((FIXStringField)fixField).Value); break; case FIXType.DateTime: writer.Write(((FIXDateTimeField)fixField).Value.Ticks); break; default: throw new ArgumentException("" + ((object)fixField.FIXType).ToString()); } } }
public ArrayList this[FIXGroup group] { [MethodImpl(MethodImplOptions.NoInlining)] get { return this.QNhZdTCxCY[(object) group.Tag] as ArrayList; } }
public ArrayList this[FIXGroup group] { [MethodImpl(MethodImplOptions.NoInlining)] get { return(this.QNhZdTCxCY[(object)group.Tag] as ArrayList); } }
public void AddFields(FIXGroup from) { foreach (FIXField field in from.Fields) { this.AddField(field); } }
public int Add(FIXGroup group) { if (group.Id != -1) { // if (this.fId.ContainsKey((object) group.Id)) // throw new ApplicationException(Ugjylcah9mCMM4kO7N.tLah92SpBQ(24) + (object) group.Id); this.fId.Add((object)group.Id, (object)group); } return(this.fList.Add((object)group)); }
public void Add(FIXGroup group) { ArrayList arrayList = this[group.Tag]; if (arrayList == null) { arrayList = new ArrayList(); this.QNhZdTCxCY.Add((object) group.Tag, (object) arrayList); } arrayList.Add((object) group); }
public void Add(FIXGroup group) { ArrayList arrayList = this[group.Tag]; if (arrayList == null) { arrayList = new ArrayList(); this.QNhZdTCxCY.Add((object)group.Tag, (object)arrayList); } arrayList.Add((object)group); }
public static void SaveFIXGroup(IDbConnection connection, FIXGroup group, string table, int outerID, int innerID) { foreach (FIXField fixField in group.Fields) { if (fixField.FIXType != FIXType.NumInGroup) { IDbCommand command = connection.CreateCommand(); command.CommandText = string.Format("commmd1", (object)table); FIXDbServer.SetCommandParameter(command, "outerID", DbType.Int32, (object)outerID); FIXDbServer.SetCommandParameter(command, "innerID", DbType.Int32, (object)innerID); FIXDbServer.SetCommandParameter(command, "FIXType", DbType.Int32, (object)fixField.FIXType); FIXDbServer.SetCommandParameter(command, "Tag", DbType.Int32, (object)fixField.Tag); string str = fixField.ToInvariantString(); if (str.Length > (int)byte.MaxValue) { str = str.Remove((int)byte.MaxValue); } FIXDbServer.SetCommandParameter(command, "Str", DbType.String, (object)str); command.ExecuteNonQuery(); command.Dispose(); } } foreach (ArrayList arrayList in group.Groups) { IDbCommand command1 = connection.CreateCommand(); command1.CommandText = "command1"; Convert.ToInt32(command1.ExecuteScalar()); command1.Dispose(); IDbCommand command2 = connection.CreateCommand(); command2.CommandText = string.Format("command2", (object)table); FIXDbServer.SetCommandParameter(command2, "outerID", DbType.Int32, (object)outerID); command2.ExecuteNonQuery(); command2.Dispose(); IDbCommand command3 = connection.CreateCommand(); command3.CommandText = "command3"; int num = Convert.ToInt32(command3.ExecuteScalar()); command3.Dispose(); foreach (FIXGroup group1 in arrayList) { IDbCommand command4 = connection.CreateCommand(); command4.CommandText = string.Format("command4", (object)table); FIXDbServer.SetCommandParameter(command4, "outerID", DbType.Int32, (object)outerID); FIXDbServer.SetCommandParameter(command4, "num", DbType.Int32, (object)num); command4.ExecuteNonQuery(); command4.Dispose(); IDbCommand command5 = connection.CreateCommand(); command5.CommandText = "command5"; int innerID1 = Convert.ToInt32(command5.ExecuteScalar()); command5.Dispose(); FIXDbServer.SaveFIXGroup(connection, group1, table, outerID, innerID1); } } }
private void AddGroups(PropertyDescriptorCollection collection, FIXGroup[] groups, string category) { int num = 1; foreach (FIXGroup fixGroup in groups) { foreach (FIXField field in fixGroup.Fields) { if (field.GetValue() != null) collection.Add((PropertyDescriptor) new FIXFieldPropertyDescriptor(field, string.Format("{0} {1}", (object) category, (object) num))); } ++num; } }
public static void SaveFIXGroup(IDbConnection connection, FIXGroup group, string table, int outerID, int innerID) { foreach (FIXField fixField in group.Fields) { if (fixField.FIXType != FIXType.NumInGroup) { IDbCommand command = connection.CreateCommand(); command.CommandText = string.Format("commmd1", (object)table); FIXDbServer.SetCommandParameter(command, "outerID", DbType.Int32, (object)outerID); FIXDbServer.SetCommandParameter(command, "innerID", DbType.Int32, (object)innerID); FIXDbServer.SetCommandParameter(command, "FIXType", DbType.Int32, (object)fixField.FIXType); FIXDbServer.SetCommandParameter(command, "Tag", DbType.Int32, (object)fixField.Tag); string str = fixField.ToInvariantString(); if (str.Length > (int)byte.MaxValue) str = str.Remove((int)byte.MaxValue); FIXDbServer.SetCommandParameter(command, "Str", DbType.String, (object)str); command.ExecuteNonQuery(); command.Dispose(); } } foreach (ArrayList arrayList in group.Groups) { IDbCommand command1 = connection.CreateCommand(); command1.CommandText = "command1"; Convert.ToInt32(command1.ExecuteScalar()); command1.Dispose(); IDbCommand command2 = connection.CreateCommand(); command2.CommandText = string.Format("command2", (object)table); FIXDbServer.SetCommandParameter(command2, "outerID", DbType.Int32, (object)outerID); command2.ExecuteNonQuery(); command2.Dispose(); IDbCommand command3 = connection.CreateCommand(); command3.CommandText = "command3"; int num = Convert.ToInt32(command3.ExecuteScalar()); command3.Dispose(); foreach (FIXGroup group1 in arrayList) { IDbCommand command4 = connection.CreateCommand(); command4.CommandText = string.Format("command4", (object)table); FIXDbServer.SetCommandParameter(command4, "outerID", DbType.Int32, (object)outerID); FIXDbServer.SetCommandParameter(command4, "num", DbType.Int32, (object)num); command4.ExecuteNonQuery(); command4.Dispose(); IDbCommand command5 = connection.CreateCommand(); command5.CommandText = "command5"; int innerID1 = Convert.ToInt32(command5.ExecuteScalar()); command5.Dispose(); FIXDbServer.SaveFIXGroup(connection, group1, table, outerID, innerID1); } } }
public override PropertyDescriptorCollection GetProperties(Attribute[] attributes) { PropertyDescriptorCollection collection = new PropertyDescriptorCollection((PropertyDescriptor[]) null); foreach (FIXField field in ((FIXGroup) this.definition).Fields) { switch ((int) field.Tag) { case 454: case 555: case 711: case 320: case 322: case 323: case 393: goto case 454; default: if (field.GetValue() != null) { collection.Add((PropertyDescriptor) new FIXFieldPropertyDescriptor(field, "_")); goto case 454; } else goto case 454; } } FIXGroup[] groups1 = new FIXGroup[this.definition.NoUnderlyings]; for (int index = 0; index < groups1.Length; ++index) groups1[index] = (FIXGroup) this.definition.GetUnderlyingsGroup(index); this.AddGroups(collection, groups1, "Underlying"); FIXGroup[] groups2 = new FIXGroup[this.definition.NoLegs]; for (int index = 0; index < groups2.Length; ++index) groups2[index] = (FIXGroup) this.definition.GetLegsGroup(index); this.AddGroups(collection, groups2, "Leg"); FIXGroup[] groups3 = new FIXGroup[this.definition.NoSecurityAltID]; for (int index = 0; index < groups3.Length; ++index) groups3[index] = (FIXGroup) this.definition.GetSecurityAltIDGroup(index); this.AddGroups(collection, groups3, "SecurityAltID"); return collection; }
public void RegisterById(FIXGroup group) { // if (this.fId.ContainsKey((object) group.Id)) // throw new ApplicationException(Ugjylcah9mCMM4kO7N.tLah92SpBQ(158) + (object) group.Id); this.fId.Add((object)group.Id, (object)group); }
public void Remove(FIXGroup group) { this.fList.Remove((object)group); this.fId.Remove((object)group.Id); }
public int Add(FIXGroup group) { if (group.Id != -1) { // if (this.fId.ContainsKey((object) group.Id)) // throw new ApplicationException(Ugjylcah9mCMM4kO7N.tLah92SpBQ(24) + (object) group.Id); this.fId.Add((object)group.Id, (object)group); } return this.fList.Add((object)group); }
public static void SaveFIXGroup(IDbConnection connection, FIXGroup group, string table, int outerID) { FIXDbServer.SaveFIXGroup(connection, group, table, outerID, -1); }
public void AddFields(FIXGroup from) { foreach (FIXField field in from.Fields) this.AddField(field); }
public bool Contains(FIXGroup group) { return this.fList.Contains((object)group); }
public int IndexOf(FIXGroup group) { return this.fList.IndexOf((object)group); }
public int IndexOf(FIXGroup group) { return(this.fList.IndexOf((object)group)); }
public bool Contains(FIXGroup group) { return(this.fList.Contains((object)group)); }