예제 #1
0
 public CovidModule(CovidDataProvider dataProvider,
                    CovidDataFormatter dataFormatter,
                    AnnouncementsDbContext dbContext,
                    CovidAnnouncer covidAnnouncer)
 {
     _dataProvider   = dataProvider;
     _dataFormatter  = dataFormatter;
     _dbContext      = dbContext;
     _covidAnnouncer = covidAnnouncer;
 }
예제 #2
0
        public CovidAnnouncer(AnnouncementsDbContext dbContext,
                              CovidDataProvider dataProvider,
                              CovidDataFormatter dataFormatter,
                              DiscordSocketClient client,
                              IConfiguration configuration)
        {
            _dbContext     = dbContext;
            _dataFormatter = dataFormatter;
            _client        = client;
            _configuration = configuration;

            dataProvider.RunOnDataUpdated(() => OnDataUpdatedAsync);
        }