Exemple #1
0
 /// <summary>
 /// Hacker News API Service Worker constructor used to Dependency Injection.
 /// </summary>
 /// <param name="configuration">Configuration instance.</param>
 /// <param name="logger">Logger instance.</param>
 /// <param name="cachedHackerNewsRepository">Hacker News Repository update the data.</param>
 public HackerNewsApiServiceWorker(IConfiguration configuration, ILogger <HackerNewsApiServiceWorker> logger,
                                   ICachedHackerNewsRepository cachedHackerNewsRepository)
 {
     _configuration = configuration;
     _logger        = logger;
     _cachedHackerNewsRepository = cachedHackerNewsRepository;
 }
Exemple #2
0
 /// <summary>
 /// API controller constructor used to Dependency Injection.
 /// </summary>
 /// <param name="logger">Logger instance.</param>
 /// <param name="hackerNewsRepository">Hacker News Repository to get the data from.</param>
 public ApiController(ILogger <ApiController> logger, ICachedHackerNewsRepository hackerNewsRepository)
 {
     _logger = logger;
     _hackerNewsRepository = hackerNewsRepository;
 }