public ScanSubBatchCommandHandler(
            IDateTimeProvider dateTimeProvider,
            ISubScanningService subScanningService,
            ISubWriteRepository subWriteRepository,
            IOptions <ScanSubBatchOptions> options,
            ISteamPageFactory steamPageFactory,
            ILogger <ScanSubBatchCommandHandler> logger)
        {
            if (options is null)
            {
                throw new ArgumentNullException(nameof(options));
            }

            if (options.Value is null)
            {
                throw new ArgumentException(
                          "The provided configuration object does not contain valid settings for sub batch processing.",
                          nameof(options));
            }

            this.dateTimeProvider   = dateTimeProvider ?? throw new ArgumentNullException(nameof(dateTimeProvider));
            this.subScanningService = subScanningService ?? throw new ArgumentNullException(nameof(subScanningService));
            this.subWriteRepository = subWriteRepository ?? throw new ArgumentNullException(nameof(subWriteRepository));
            this.steamPageFactory   = steamPageFactory ?? throw new ArgumentNullException(nameof(steamPageFactory));
            this.logger             = logger ?? throw new ArgumentNullException(nameof(logger));

            degreeOfParallelism = options.Value.DegreeOfParallelism;

            logger.LogInformation("Using degree of parallelism: {@DegreeOfParallelism}", degreeOfParallelism);
        }
 public CrawlerPrefetchService(
     ICrawlerAddressRegistrationService crawlerAddressRegistrationService,
     ISteamPageFactory steamPageFactory)
 {
     this.crawlerAddressRegistrationService = crawlerAddressRegistrationService ?? throw new ArgumentNullException(nameof(crawlerAddressRegistrationService));
     this.steamPageFactory = steamPageFactory ?? throw new ArgumentNullException(nameof(steamPageFactory));
 }