public ReadingSession( ILogger <ReadingSession> logger, RetrieveConfiguration httpConfiguration, Func <ITrackedRetrieval, IAuthentication> authentication, Func <ITrackedRetrieval, IArticleTextReader> textReader, Func <ITrackedRetrieval, ArticleDefinition, ICommentsReader> commentReader, ITrackedRetrieval reader) { this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); this.httpConfiguration = httpConfiguration ?? throw new ArgumentNullException(nameof(httpConfiguration)); this.authentication = authentication ?? throw new ArgumentNullException(nameof(authentication)); this.textReader = textReader ?? throw new ArgumentNullException(nameof(textReader)); this.commentReader = commentReader ?? throw new ArgumentNullException(nameof(commentReader)); this.reader = reader ?? throw new ArgumentNullException(nameof(reader)); calls = new SemaphoreSlim(httpConfiguration.MaxConcurrent); }
public NetworkModule(RetrieveConfiguration configuration) { this.configuration = configuration ?? throw new ArgumentNullException(nameof(configuration)); }