示例#1
0
 public StatsCommand(ILogger <WordCommand> logger, IOptions <WordsBotConfiguration> configuration, IServiceScopeFactory scopeFactory)
 {
     _logger        = logger;
     _configuration = configuration.Value;
     _scopeFactory  = scopeFactory;
     _conditions    = new List <Predicate <Update> >
     {
         Conditions.IsUpdateMessage,
         Conditions.IsMessageNotNullOrEmpty,
         Conditions.IsMessageSingleWord,
         Conditions.IsMessageCommand,
         update => Conditions.IsMessageBotCommand(update, _configuration.TelegramBotName, Tag)
     };
 }
 public TelegramDbContext(IOptions <WordsBotConfiguration> configuration) : base()
 {
     _configuration = configuration.Value;
 }
示例#3
0
 public TelegramBotWorker(ILogger <TelegramBotWorker> logger, IOptions <WordsBotConfiguration> configuration, IServiceScopeFactory scopeFactory)
 {
     _logger        = logger;
     _configuration = configuration.Value;
     _scopeFactory  = scopeFactory;
 }
 public KeepAliveWorker(ILogger <KeepAliveWorker> logger, IOptions <WordsBotConfiguration> configuration, IHttpClientFactory httpClientFactory)
 {
     _logger            = logger;
     _configuration     = configuration.Value;
     _httpClientFactory = httpClientFactory;
 }
示例#5
0
 public DatabaseController(IOptions <WordsBotConfiguration> configuration)
 {
     _configuration = configuration.Value;
 }