public SearchController(IPostRepository postRepository, IPostIndexer postIndexer, SiteConfiguration siteConfiguration, ICache postContentCache) { _postRepository = postRepository ?? throw new ArgumentNullException(nameof(postRepository)); _postIndexer = postIndexer ?? throw new ArgumentNullException(nameof(postIndexer)); _siteConfiguration = siteConfiguration ?? throw new ArgumentNullException(nameof(siteConfiguration)); _postContentCache = postContentCache ?? throw new ArgumentNullException(nameof(postContentCache)); }
public RSSController(IPostRepository postRepository, SiteConfiguration siteConfiguration, ICache postContentCache) { if (siteConfiguration == null) { throw new ArgumentNullException(nameof(siteConfiguration)); } _postRepository = postRepository ?? throw new ArgumentNullException(nameof(postRepository)); _maximumNumberOfPostsToPublish = siteConfiguration.MaximumNumberOfPostsToPublishInRssFeed; _postContentCache = postContentCache ?? throw new ArgumentNullException(nameof(postContentCache)); }
public ViewPostController(IPostRepository postRepository, SiteConfiguration siteConfiguration, ICache postContentCache) { _postRepository = postRepository ?? throw new ArgumentNullException(nameof(postRepository)); _siteConfiguration = siteConfiguration ?? throw new ArgumentNullException(nameof(siteConfiguration)); _postContentCache = postContentCache ?? throw new ArgumentNullException(nameof(postContentCache)); }