Esempio n. 1
0
 public InstrumentList Load()
 {
     IDbCommand command1 = this.connection.CreateCommand();
     command1.CommandText = "comdd";
     IDataReader dataReader1 = command1.ExecuteReader();
     while (dataReader1.Read())
     {
         int int32 = dataReader1.GetInt32(0);
         Type type = Type.GetType(dataReader1.GetString(1));
         this.aKpdKBGUfP.Add(int32, type);
         this.cVFd9nJe3b.Add(type, int32);
     }
     dataReader1.Close();
     command1.Dispose();
     IDbCommand command2 = this.connection.CreateCommand();
     command2.CommandText = "load";
     IDataReader dataReader2 = command2.ExecuteReader();
     while (dataReader2.Read())
     {
         int int32 = dataReader2.GetInt32(0);
         Type type = Type.GetType(dataReader2.GetString(1));
         this.BuYdCExFpF.Add(int32, type);
         this.UXKdMsMyXN.Add(type, int32);
     }
     dataReader2.Close();
     command2.Dispose();
     InstrumentList instrumentList = new InstrumentList();
     IDbCommand command3 = this.connection.CreateCommand();
     command3.CommandText = "load";
     IDataReader dataReader3 = command3.ExecuteReader();
     while (dataReader3.Read())
     {
         int int32 = dataReader3.GetInt32(0);
         Type type1 = this.aKpdKBGUfP[dataReader3.GetInt32(1)];
         Type type2 = this.BuYdCExFpF[dataReader3.GetInt32(2)];
         string @string = dataReader3.GetString(3);
         Instrument instrument = Activator.CreateInstance(type1, true) as Instrument;
         IPricer pricer = Activator.CreateInstance(type2) as IPricer;
         instrument.Symbol = @string;
         instrument.Id = int32;
         instrument.Pricer = pricer;
         if (instrumentList[@string] == null)
             instrumentList.Add(instrument);
     }
     dataReader3.Close();
     command3.Dispose();
     FIXDbServer.LoadFIXGroups(this.connection, (FIXGroupList)instrumentList, "fsdfs");
     LegList legList = new LegList();
     IDbCommand command4 = this.connection.CreateCommand();
     command4.CommandText = "load";
     IDataReader dataReader4 = command4.ExecuteReader();
     while (dataReader4.Read())
     {
         int int32_1 = dataReader4.GetInt32(0);
         int int32_2 = dataReader4.GetInt32(1);
         int int32_3 = dataReader4.GetInt32(2);
         Leg leg = new Leg(instrumentList.GetById(int32_3));
         leg.Id = int32_1;
         instrumentList.GetById(int32_2).Legs.Add((FIXGroup)leg);
         legList.Add((FIXGroup)leg);
     }
     dataReader4.Close();
     command4.Dispose();
     FIXDbServer.LoadFIXGroups(this.connection, (FIXGroupList)legList, "");
     UnderlyingList underlyingList = new UnderlyingList();
     IDbCommand command5 = this.connection.CreateCommand();
     command5.CommandText = "load";
     IDataReader dataReader5 = command5.ExecuteReader();
     while (dataReader5.Read())
     {
         int int32_1 = dataReader5.GetInt32(0);
         int int32_2 = dataReader5.GetInt32(1);
         int int32_3 = dataReader5.GetInt32(2);
         Underlying underlying = new Underlying(instrumentList.GetById(int32_3));
         underlying.Id = int32_1;
         instrumentList.GetById(int32_2).Underlyings.Add((FIXGroup)underlying);
         underlyingList.Add((FIXGroup)underlying);
     }
     dataReader5.Close();
     command5.Dispose();
     FIXDbServer.LoadFIXGroups(this.connection, (FIXGroupList)underlyingList, "dss");
     FIXSecurityAltIDGroupList securityAltIdGroupList = new FIXSecurityAltIDGroupList();
     IDbCommand command6 = this.connection.CreateCommand();
     command6.CommandText = "load";
     IDataReader dataReader6 = command6.ExecuteReader();
     while (dataReader6.Read())
     {
         int int32_1 = dataReader6.GetInt32(0);
         int int32_2 = dataReader6.GetInt32(1);
         FIXSecurityAltIDGroup securityAltIdGroup = new FIXSecurityAltIDGroup();
         securityAltIdGroup.Id = int32_1;
         instrumentList.GetById(int32_2).SecurityAltIDGroup.Add((FIXGroup)securityAltIdGroup);
         securityAltIdGroupList.Add((FIXGroup)securityAltIdGroup);
     }
     dataReader6.Close();
     command6.Dispose();
     FIXDbServer.LoadFIXGroups(this.connection, (FIXGroupList)securityAltIdGroupList, "fsfs");
     return instrumentList;
 }
Esempio n. 2
0
        public InstrumentList Load()
        {
            IDbCommand command1 = this.connection.CreateCommand();

            command1.CommandText = "comdd";
            IDataReader dataReader1 = command1.ExecuteReader();

            while (dataReader1.Read())
            {
                int  int32 = dataReader1.GetInt32(0);
                Type type  = Type.GetType(dataReader1.GetString(1));
                this.aKpdKBGUfP.Add(int32, type);
                this.cVFd9nJe3b.Add(type, int32);
            }
            dataReader1.Close();
            command1.Dispose();
            IDbCommand command2 = this.connection.CreateCommand();

            command2.CommandText = "load";
            IDataReader dataReader2 = command2.ExecuteReader();

            while (dataReader2.Read())
            {
                int  int32 = dataReader2.GetInt32(0);
                Type type  = Type.GetType(dataReader2.GetString(1));
                this.BuYdCExFpF.Add(int32, type);
                this.UXKdMsMyXN.Add(type, int32);
            }
            dataReader2.Close();
            command2.Dispose();
            InstrumentList instrumentList = new InstrumentList();
            IDbCommand     command3       = this.connection.CreateCommand();

            command3.CommandText = "load";
            IDataReader dataReader3 = command3.ExecuteReader();

            while (dataReader3.Read())
            {
                int        int32      = dataReader3.GetInt32(0);
                Type       type1      = this.aKpdKBGUfP[dataReader3.GetInt32(1)];
                Type       type2      = this.BuYdCExFpF[dataReader3.GetInt32(2)];
                string     @string    = dataReader3.GetString(3);
                Instrument instrument = Activator.CreateInstance(type1, true) as Instrument;
                IPricer    pricer     = Activator.CreateInstance(type2) as IPricer;
                instrument.Symbol = @string;
                instrument.Id     = int32;
                instrument.Pricer = pricer;
                if (instrumentList[@string] == null)
                {
                    instrumentList.Add(instrument);
                }
            }
            dataReader3.Close();
            command3.Dispose();
            FIXDbServer.LoadFIXGroups(this.connection, (FIXGroupList)instrumentList, "fsdfs");
            LegList    legList  = new LegList();
            IDbCommand command4 = this.connection.CreateCommand();

            command4.CommandText = "load";
            IDataReader dataReader4 = command4.ExecuteReader();

            while (dataReader4.Read())
            {
                int int32_1 = dataReader4.GetInt32(0);
                int int32_2 = dataReader4.GetInt32(1);
                int int32_3 = dataReader4.GetInt32(2);
                Leg leg     = new Leg(instrumentList.GetById(int32_3));
                leg.Id = int32_1;
                instrumentList.GetById(int32_2).Legs.Add((FIXGroup)leg);
                legList.Add((FIXGroup)leg);
            }
            dataReader4.Close();
            command4.Dispose();
            FIXDbServer.LoadFIXGroups(this.connection, (FIXGroupList)legList, "");
            UnderlyingList underlyingList = new UnderlyingList();
            IDbCommand     command5       = this.connection.CreateCommand();

            command5.CommandText = "load";
            IDataReader dataReader5 = command5.ExecuteReader();

            while (dataReader5.Read())
            {
                int        int32_1    = dataReader5.GetInt32(0);
                int        int32_2    = dataReader5.GetInt32(1);
                int        int32_3    = dataReader5.GetInt32(2);
                Underlying underlying = new Underlying(instrumentList.GetById(int32_3));
                underlying.Id = int32_1;
                instrumentList.GetById(int32_2).Underlyings.Add((FIXGroup)underlying);
                underlyingList.Add((FIXGroup)underlying);
            }
            dataReader5.Close();
            command5.Dispose();
            FIXDbServer.LoadFIXGroups(this.connection, (FIXGroupList)underlyingList, "dss");
            FIXSecurityAltIDGroupList securityAltIdGroupList = new FIXSecurityAltIDGroupList();
            IDbCommand command6 = this.connection.CreateCommand();

            command6.CommandText = "load";
            IDataReader dataReader6 = command6.ExecuteReader();

            while (dataReader6.Read())
            {
                int int32_1 = dataReader6.GetInt32(0);
                int int32_2 = dataReader6.GetInt32(1);
                FIXSecurityAltIDGroup securityAltIdGroup = new FIXSecurityAltIDGroup();
                securityAltIdGroup.Id = int32_1;
                instrumentList.GetById(int32_2).SecurityAltIDGroup.Add((FIXGroup)securityAltIdGroup);
                securityAltIdGroupList.Add((FIXGroup)securityAltIdGroup);
            }
            dataReader6.Close();
            command6.Dispose();
            FIXDbServer.LoadFIXGroups(this.connection, (FIXGroupList)securityAltIdGroupList, "fsfs");
            return(instrumentList);
        }