Esempio n. 1
0
        /// <summary>
        ///     测试线程
        /// </summary>
        public TestThread()
        {
            _testOption = new TestOption();
            _timeOut    = Config.LocalSetting.TestTimeOut;
            if (Config.LocalSetting.DefaultTestOption != null)
            {
                _testOption = Config.LocalSetting.DefaultTestOption;
            }

            _testProxyHelper = new TestProxyHelper(_testOption, _timeOut, Config.LocalSetting.UserAgent);

            _thread = new Thread(DoWork);
            Name    = _thread.ManagedThreadId.ToString(CultureInfo.InvariantCulture);
            Status  = _thread.ThreadState.ToString();
        }
Esempio n. 2
0
 /// <summary>
 ///     自动切换代理
 /// </summary>
 public AutoSwitchingHelper()
 {
     try
     {
         SetQueue();
         _testProxyHelper = new TestProxyHelper(Config.LocalSetting.DefaultTestOption,
                                                Config.LocalSetting.TestTimeOut,
                                                Config.LocalSetting.UserAgent);
     }
     catch (Exception ex)
     {
         Config.ConsoleEx.Debug(ex);
         throw ex;
     }
 }