示例#1
0
 public BestStoriesService(IHackerNewsHttpClient httpClient, ICacheService cache, IOptions <ApiSettings> settings)
 {
     this.httpClient = httpClient ?? throw new ArgumentNullException(nameof(httpClient));
     this.cache      = cache ?? throw new ArgumentNullException(nameof(cache));
     this.settings   = settings.Value ?? throw new ArgumentNullException(nameof(settings));
 }
示例#2
0
 public HackerNews(IHackerNewsHttpClient client, IMemoryCache cache)
 {
     _client = client;
     _cache  = cache;
 }