Exemplo n.º 1
0
        public Brokers CreateBrokersFromConf(string path = "")
        {
            Brokers brokers = new Brokers();

            brokers.Add("XSpeed测试服务器群", new FrontServers(BrokerType.XSpeed));
            brokers.Add("QDP测试服务器群", new FrontServers(BrokerType.QDP));
            brokers["XSpeed测试服务器群"].Add(new FrontServer("XSpeed交易前置测试", "203.187.171.250", 10910, ServerType.TradeFrontSvr));
            brokers["XSpeed测试服务器群"].Add(new FrontServer("XSpeed行情前置测试", "203.187.171.250", 10915, ServerType.MarketFrontSvr));
            brokers["QDP测试服务器群"].Add(new FrontServer("QDP交易前置测试", "211.147.74.221", 30005, ServerType.TradeFrontSvr));
            brokers["QDP测试服务器群"].Add(new FrontServer("QDP行情前置测试", "211.147.74.221", 30007, ServerType.TradeFrontSvr));
            return(brokers);
        }
Exemplo n.º 2
0
 public Brokers this[BrokerType type]
 {
     get
     {
         Brokers result = new Brokers();
         foreach (var brk in this)
         {
             if (brk.Value.BrokerType == type)
             {
                 result.Add(brk.Key, brk.Value);
             }
         }
         return(result);
     }
 }