public TrendService(IConnectionFactory connectionFactory, IPostCountsCache postCountsCache, IStoryCountCache storyCountCache, IResultsCache resultsCache) { this.connectionFactory = connectionFactory; this.postCountsCache = postCountsCache ?? throw new ArgumentNullException(nameof(postCountsCache)); this.storyCountCache = storyCountCache ?? throw new ArgumentNullException(nameof(storyCountCache)); this.resultsCache = resultsCache ?? throw new ArgumentNullException(nameof(resultsCache)); }
public TrendService(IIndexManager indexManager, IPostCountsCache postCountsCache, IStoryCountCache storyCountCache, IResultsCache resultsCache) { this.indexManager = indexManager ?? throw new ArgumentNullException(nameof(indexManager)); this.postCountsCache = postCountsCache ?? throw new ArgumentNullException(nameof(postCountsCache)); this.storyCountCache = storyCountCache ?? throw new ArgumentNullException(nameof(storyCountCache)); this.resultsCache = resultsCache ?? throw new ArgumentNullException(nameof(resultsCache)); }