private void FillList(List <ServerAddress> serverList, IEnumerable <XElement> elemItems, string namePrefix)
 {
     if (elemItems != null)
     {
         int idx = 1;
         foreach (var item in elemItems)
         {
             ServerAddress svrAddr = new ServerAddress();
             svrAddr.Name = string.Format("{0} {1}", namePrefix, idx++);
             if (item.Value.StartsWith("udp"))
             {
                 svrAddr.Address = item.Value;
             }
             else
             {
                 svrAddr.Address = "tcp://" + item.Value;
             }
             serverList.Add(svrAddr);
         }
     }
 }
        public void SelectTrading(string name)
        {
            ServerAddress addr = _td_servers.Find(s => s.Name == name);

            EffectiveTrading = addr != null ? addr : _td_servers.FirstOrDefault();
        }
        public void SelectTradeStation(string name)
        {
            ServerAddress addr = _trade_stations.Find(s => s.Name == name);

            EffectiveTradeStation = addr != null ? addr : _trade_stations.FirstOrDefault();
        }
        public void SelectMarket(string name)
        {
            ServerAddress addr = _mkt_servers.Find(s => s.Name == name);

            EffectiveMarket = addr != null ? addr : _mkt_servers.FirstOrDefault();
        }