public BirthdayNotificationsService(BirthdayNotificationScheduleRepository birthdayScheduleTelegramBotRepository,
                                     BirthdayService birthdayService,
                                     ITelegramBotClient botClient)
 {
     _botClient       = botClient ?? throw new ArgumentNullException(nameof(botClient));
     _birthdayService = birthdayService ?? throw new ArgumentNullException(nameof(birthdayService));
     _birthdayScheduleTelegramBotRepository = birthdayScheduleTelegramBotRepository ?? throw new ArgumentNullException(nameof(birthdayScheduleTelegramBotRepository));
 }
Ejemplo n.º 2
0
        public BirthdayScheduleTelegramBotJobsHandler(ErrorLog errorLog,
                                                      IOptionsMonitor <AuthOptions> authOptionsAccessor,
                                                      BirthdayNotificationScheduleRepository birthdayScheduleTelegramBotRepository,
                                                      BirthdayNotificationsService birthdayNotificationsService,
                                                      ITelegramBotClient telegramBotClient)
        {
            _authOptions = authOptionsAccessor.CurrentValue;
            _errorLog    = errorLog ?? throw new ArgumentNullException(nameof(errorLog));
            _birthdayScheduleTelegramBotRepository = birthdayScheduleTelegramBotRepository ?? throw new ArgumentNullException(nameof(birthdayScheduleTelegramBotRepository));
            _birthdayNotificationsService          = birthdayNotificationsService ?? throw new ArgumentNullException(nameof(birthdayNotificationsService));
            _telegramBotClient = telegramBotClient ?? throw new ArgumentNullException(nameof(telegramBotClient));

            authOptionsAccessor.OnChange(x => _authOptions = x);
        }
Ejemplo n.º 3
0
 public BirthdayNotificationBotService(BirthdayNotificationScheduleRepository birthdayScheduleTelegramBotRepository, ITelegramBotClient botClient)
 {
     BotClient = botClient;
     BirthdayScheduleTelegramBotRepository = birthdayScheduleTelegramBotRepository;
 }