Ejemplo n.º 1
0
        internal InstructDriver(PassportClient client)
        {
            LogHelper.CreateLog(null, string.Format("ID为{0}的Passport客户端启动", client.ClientID), "passport.log");
            this.Client       = client;
            this.InstructList = new Queue <Instruct>(this.QueueSize);
            watch             = new Stopwatch();
            ClientService     = new ClientInterface();
            ClientService.Url = UrlUtil.JoinUrl(Client.Url.Trim(), client.APIFilePath);
            //ClientService.AllowAutoRedirect = true;



            LastSuccessTime = DateTime.Now;
            LoadDbInstruct();//载入数据库数据

            if (this.InstructList.Count > 0)
            {
                this.thread         = new Thread(ThreadStart);
                thread.IsBackground = true;
                thread.Start();
            }
            else
            {
                this.IsOpenQueue = true; //没有数据库记录, 打开队列
            }
        }
Ejemplo n.º 2
0
        internal InstructDriver(PassportClient client)
        {
            LogHelper.CreateLog(null, string.Format("ID为{0}的Passport客户端启动", client.ClientID), "passport.log");
            this.Client = client;
            this.InstructList = new Queue<Instruct>(this.QueueSize);
            watch = new Stopwatch();
            ClientService = new ClientInterface();
            ClientService.Url = UrlUtil.JoinUrl(Client.Url.Trim(), client.APIFilePath);
            //ClientService.AllowAutoRedirect = true;



            LastSuccessTime = DateTime.Now;
            LoadDbInstruct();//载入数据库数据

            if (this.InstructList.Count>0)
            {
                this.thread = new Thread(ThreadStart);
                thread.IsBackground = true;
                thread.Start();
            }
            else
                this.IsOpenQueue = true; //没有数据库记录, 打开队列
        }