/// <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(); }
/// <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; } }