コード例 #1
0
 /// <summary>
 /// 默认参数
 /// </summary>
 public Crawler()
 {
     _crawler = new CrawlerManager(10);
 }
コード例 #2
0
 /// <summary>
 /// 指定参数构造
 /// </summary>
 /// <param name="crawlOptions"></param>
 public Crawler(CrawlOptions crawlOptions)
 {
     _crawler = new CrawlerManager(crawlOptions.MaxCrawlThread);
     _crawler.InitCrawThread();
 }
コード例 #3
0
 /// <summary>
 /// 构造函数(为线程的采集主体赋值)
 /// </summary>
 /// <param name="Linker"></param>
 public CrawlThread(CrawlerManager crawler)
 {
     _thread = new Thread(DoWork);
     _thread.IsBackground = true;
     _crawler             = crawler;
 }