Ejemplo n.º 1
0
 /// <summary>
 /// 初始化 +CrawlMaster(CrawlSettings settings)
 /// 1.cookieContainer
 /// 2.random
 /// 3.Settings
 /// 4.threads
 /// 5.threadStatus
 /// </summary>
 /// <param name="settings">
 /// The settings.
 /// </param>
 public CrawlMaster(CrawlSettings settings)
 {
     this.cookieContainer = new CookieContainer();
     this.random = new Random();
     this.Settings = settings;
     this.threads = new Thread[settings.ThreadCount];
     this.threadStatus = new bool[settings.ThreadCount];
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 初始化 +CrawlMaster(CrawlSettings settings)
 /// 1.cookieContainer
 /// 2.random
 /// 3.Settings
 /// 4.threads
 /// 5.threadStatus
 /// </summary>
 /// <param name="settings">
 /// The settings.
 /// </param>
 public CrawlMaster(CrawlSettings settings)
 {
     this.cookieContainer = new CookieContainer();
     this.random          = new Random();
     this.Settings        = settings;
     this.threads         = new Thread[settings.ThreadCount];
     this.threadStatus    = new bool[settings.ThreadCount];
 }