Example #1
0
        public TariffService(
            IQuotaService quotaService,
            ITenantService tenantService,
            CoreBaseSettings coreBaseSettings,
            CoreSettings coreSettings,
            IConfiguration configuration,
            DbContextManager <CoreDbContext> coreDbContextManager,
            TariffServiceStorage tariffServiceStorage,
            IOptionsMonitor <ILog> options)
            : this()

        {
            Log                  = options.CurrentValue;
            QuotaService         = quotaService;
            TenantService        = tenantService;
            CoreSettings         = coreSettings;
            Configuration        = configuration;
            TariffServiceStorage = tariffServiceStorage;
            Options              = options;
            CoreBaseSettings     = coreBaseSettings;
            Test                 = configuration["core:payment:test"] == "true";
            int.TryParse(configuration["core:payment:delay"], out var paymentDelay);

            PaymentDelay = paymentDelay;

            Cache         = TariffServiceStorage.Cache;
            Notify        = TariffServiceStorage.Notify;
            CoreDbContext = coreDbContextManager.Value;
        }
Example #2
0
        private TariffService(
            IQuotaService quotaService,
            ITenantService tenantService,
            CoreBaseSettings coreBaseSettings,
            CoreSettings coreSettings,
            IConfiguration configuration,
            TariffServiceStorage tariffServiceStorage,
            IOptionsMonitor <ILog> options)

        {
            log = options.CurrentValue;
            this.quotaService    = quotaService;
            this.tenantService   = tenantService;
            CoreSettings         = coreSettings;
            Configuration        = configuration;
            TariffServiceStorage = tariffServiceStorage;
            Options          = options;
            CoreBaseSettings = coreBaseSettings;
            CacheExpiration  = DEFAULT_CACHE_EXPIRATION;
            test             = configuration["core:payment:test"] == "true";
            int.TryParse(configuration["core:payment:delay"], out paymentDelay);

            cache  = TariffServiceStorage.Cache;
            notify = TariffServiceStorage.Notify;
        }
Example #3
0
        public TariffService(
            IQuotaService quotaService,
            ITenantService tenantService,
            CoreBaseSettings coreBaseSettings,
            CoreSettings coreSettings,
            IConfiguration configuration,
            CoreDbContext coreDbContext,
            TariffServiceStorage tariffServiceStorage,
            IOptionsMonitor <ILog> options)
            : this(quotaService, tenantService, coreBaseSettings, coreSettings, configuration, tariffServiceStorage, options)

        {
            CoreDbContext = coreDbContext;
        }
Example #4
0
 public ConfigureTariffService(
     IOptionsSnapshot <CachedQuotaService> quotaService,
     IOptionsSnapshot <CachedTenantService> tenantService,
     CoreBaseSettings coreBaseSettings,
     CoreSettings coreSettings,
     IConfiguration configuration,
     DbContextManager <CoreDbContext> coreDbContextManager,
     TariffServiceStorage tariffServiceStorage,
     IOptionsMonitor <ILog> iLog)
 {
     QuotaService         = quotaService;
     TenantService        = tenantService;
     CoreBaseSettings     = coreBaseSettings;
     CoreSettings         = coreSettings;
     Configuration        = configuration;
     CoreDbContextManager = coreDbContextManager;
     TariffServiceStorage = tariffServiceStorage;
     ILog = iLog;
 }