public Scraper(IScraperQueue scraperQueue, ICrawlLogger crawlLogger, AsyncManualResetEvent manualResetEvent, CancellationToken cancellationToken) { _scraperQueue = scraperQueue ?? throw new ArgumentNullException(nameof(scraperQueue)); _crawlLogger = crawlLogger ?? throw new ArgumentNullException(nameof(crawlLogger)); _manualResetEvent = manualResetEvent ?? throw new ArgumentNullException(nameof(manualResetEvent)); _cancellationToken = cancellationToken; }
public ScraperDequeuer(ILogger <ScraperDequeuer> logger, IServiceProvider serviceProvider, IScraperQueue queue, IBrowserService browserService) { _logger = logger; _queue = queue; _serviceProvider = serviceProvider; _browserService = browserService; }
public ScrapingSheduler(IServiceProvider services, ILogger <ScrapingSheduler> logger, IScraperQueue queue) { Services = services; _logger = logger; _schedule = CrontabSchedule.Parse(Schedule); _nextRun = _schedule.GetNextOccurrence(DateTime.Now); _queue = queue; }
public ScraperFactory(IScraperQueue scraperQueue, ICrawlLogger crawlLogger) { _scraperQueue = scraperQueue ?? throw new ArgumentNullException(nameof(scraperQueue)); _crawlLogger = crawlLogger ?? throw new ArgumentNullException(nameof(crawlLogger)); }