public LiveElectionUrlBuilder(IOptions <LiveElectionSettings> options) { _settings = options.Value; // Local elections CreateDefaultCodes(); }
public TurnoutCrawler(IServiceProvider serviceProvider, IOptions <LiveElectionSettings> options, IFileDownloader fileDownloader, IAppCache appCache) { _serviceProvider = serviceProvider; _fileDownloader = fileDownloader; _appCache = appCache; _settings = options.Value; }
public BallotsController(ILogger <BallotsController> logger, IResultsAggregator resultsAggregator, IAppCache appCache, ITerritoryRepository territoryRepository, IOptions <LiveElectionSettings> settings) { _logger = logger; _resultsAggregator = resultsAggregator; _appCache = appCache; _territoryRepository = territoryRepository; _settings = settings.Value; }
public ResultsCrawler(IFileDownloader fileDownloader, IOptions <LiveElectionSettings> options, IAppCache appCache, IServiceProvider serviceProvider, ILiveElectionUrlBuilder liveElectionUrlBuilder) { _fileDownloader = fileDownloader; _liveElectionSettings = options.Value; _appCache = appCache; _serviceProvider = serviceProvider; _liveElectionUrlBuilder = liveElectionUrlBuilder; }
public ResultsAggregator(IServiceProvider serviceProvider, IPartiesRepository partiesRepository, IWinnersAggregator winnersAggregator, IElectionsRepository electionRepository, IOptions <LiveElectionSettings> options, ILiveElectionUrlBuilder urlBuilder, IAppCache appCache, IResultsCrawler resultsCrawler) { _serviceProvider = serviceProvider; _partiesRepository = partiesRepository; _winnersAggregator = winnersAggregator; _electionRepository = electionRepository; _urlBuilder = urlBuilder; _appCache = appCache; _resultsCrawler = resultsCrawler; _settings = options.Value; }
public ScheduledProcessor(IServiceScopeFactory serviceScopeFactory, IOptions <LiveElectionSettings> options) : base(serviceScopeFactory) { _nextRun = DateTime.Now.AddSeconds(1); _settings = options.Value; Log.LogInformation($"Next run will be at {_nextRun:F}"); }
public FileDownloader(IOptions <LiveElectionSettings> options) { _settings = options.Value; _semaphoreSlim = new SemaphoreSlim(1); }
public FileDownloader(IOptions <LiveElectionSettings> options) { _settings = options.Value; }