Exemple #1
0
 public Service(IOptions <UtilitiesBotSettings> _option, ILogger <IService> logger)
 {
     using (logger.BeginScope("init"))
         try
         {
             _logger   = logger;
             _settings = _option.Value;
             _bot      = new TelegramBotClient(_settings.ApiKey);
             _cache    = CacheManager.Core.CacheFactory.Build("botCache", p => p.WithDictionaryHandle());
         }
         catch (Exception ex)
         {
             logger.LogError(ex.ToString());
             throw;
         }
 }
 public DefaultCacheManager(CacheManager.Core.ICacheManager <T> cacheManager)
 {
     _cacheManager = cacheManager;
 }
Exemple #3
0
 public UrlTenantResolverProvider(CacheManager.Core.ICacheManager <Tenant> cacheManager)
 {
     _cacheManager = cacheManager;
 }