Example #1
0
        public PageLinksCrawlDisallowedArgs(CrawlContext crawlContext, CrawledPage crawledPage, string disallowedReason)
            : base(crawlContext, crawledPage)
        {
            if (string.IsNullOrWhiteSpace(disallowedReason))
            {
                throw new ArgumentNullException("disallowedReason");
            }

            DisallowedReason = disallowedReason;
        }
        public PageCrawlDisallowedArgs(CrawlContext crawlContext, PageToCrawl pageToCrawl, string disallowedReason)
            : base(crawlContext, pageToCrawl)
        {
            if (string.IsNullOrWhiteSpace(disallowedReason))
            {
                throw new ArgumentNullException("disallowedReason");
            }

            DisallowedReason = disallowedReason;
        }
Example #3
0
 public PageCrawlCompletedArgs(CrawlContext crawlContext, CrawledPage crawledPage)
     : base(crawlContext)
 {
     CrawledPage = crawledPage ?? throw new ArgumentNullException("crawledPage");
 }
 public PageCrawlStartingArgs(CrawlContext crawlContext, PageToCrawl pageToCrawl)
     : base(crawlContext)
 {
     PageToCrawl = pageToCrawl ?? throw new ArgumentNullException("pageToCrawl");
 }
Example #5
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="crawlContext">上下文</param>
 /// <param name="crawlResult">抓取结果</param>
 public CrawlCompletedArgs(CrawlContext crawlContext, CrawlResult crawlResult)
     : base(crawlContext)
 {
     Result = crawlResult ?? throw new ArgumentNullException("crawlResult");
 }
Example #6
0
 public CrawlArgs(CrawlContext crawlContext)
 {
     CrawlContext = crawlContext ?? throw new ArgumentNullException("crawlContext");
 }