Exemple #1
0
        static void Main(string[] args)
        {
            Config cfg = new Config("config.txt");

            RtdCallBack callBack = new RtdCallBack(Program.CallBack);

            String spotBondCode = cfg.GetValue(KTB_SPOT_INDEX);

            List<String> targetIP = GetTargetIP(cfg);
            RegisterClient(targetIP);
            Register_Bond(spotBondCode, callBack);

            while (true)
            {
                Console.Read();
            }
        }
Exemple #2
0
        static List<String> GetTargetIP(Config cfg)
        {
            List<String> rets = new List<string>();

            String targetIPs = cfg.GetValue(TARGET_IP);

            String remain = targetIPs;

            while (remain.Length > 0)
            {
                String ip = remain.Substring(0, remain.IndexOf("|"));
                remain = remain.Substring(remain.IndexOf("|") + 1);
                remain = remain.Trim();
                rets.Add(ip);
            }
            return rets;
        }