/// <summary>
 /// Initializes a new instance of the <see cref="WebClientService"/> class.
 /// </summary>
 /// <param name="logger">The logger.</param>
 /// <param name="configuration">The configuration.</param>
 /// <param name="newsRepository">The news repository.</param>
 /// <param name="newsConfiguration">The news configuration.</param>
 public WebClientService(ILogger <WebClientService> logger, INewsRepository newsRepository,
                         NewsConfiguration newsConfiguration)
 {
     this.logger            = logger;
     this.newsRepository    = newsRepository;
     this.newsConfiguration = newsConfiguration;
 }
Esempio n. 2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="Startup"/> class.
        /// </summary>
        public Startup()
        {
            var builder = new ConfigurationBuilder()
                          .AddJsonFile(NewsConfiguration.configFile);

            Configuration = builder.Build();
            config        = NewsConfiguration.Load();
            AddLogging();
        }