Esempio n. 1
0
        public static IUpOrderProvider CreateOrderProvider(string simnum, string ip, int port, IDownOrderReceiver receiver)
        {
            //可改成DI模式,以后又别的协议可配。
            IUpOrderPacker   packer = new UpOrderPacker(simnum);
            IDownOrderParser parser = new DownOrderParser(receiver);
            var client = new Client(ip, port, parser);

            return(new JTB808OrderProvider(simnum, ip, port, parser, packer, client));
        }
Esempio n. 2
0
 public DownOrder()
 {
     parser = new DownOrderParser(this);
 }