Ejemplo n.º 1
0
 public AutoPollingBotApplication(
     IMiddlewaresChain middlewares,
     IAutoPollerConfiguration autoPollerConfiguration,
     AutoPoller autoPoller,
     ILogger <AutoPollingBotApplication> logger
     ) : base(middlewares, logger)
 {
     _autoPollerConfiguration = autoPollerConfiguration;
     _autoPoller = autoPoller;
     _autoPoller.UpdateReceived += (sender, eventArgs) => EnqueueUpdate(eventArgs.Update);
 }
Ejemplo n.º 2
0
        public AutoPoller(ITelegramClient client, IPollerHistoryStorage historyStorage, IAutoPollerConfiguration configuration, ILoggerFactory loggerFactory)
        {
            _client         = client;
            _historyStorage = historyStorage;


            _logger         = loggerFactory.CreateLogger(GetType());
            _oneTimeLimit   = configuration.OneTimeLimit ?? DefaultOneTimeLimit;
            _poolingTimeout = configuration.PoolingTimeout ?? DefaultPollingTimeout;
            _fieldsFilter   = configuration.FieldsFilter;
        }