Ejemplo n.º 1
0
        public HostedSolution(
            IConfiguration configuration,
            ConnectionStringSettings connectionString,
            TariffServiceStorage tariffServiceStorage,
            IOptionsMonitor <ILog> options,
            TenantUtil tenantUtil,
            TenantDomainValidator tenantDomainValidator,
            TenantDbContext tenantDbContext,
            UserDbContext userDbContext,
            CoreDbContext coreDbContext,
            string region)
        {
            tenantService = new DbTenantService(tenantDbContext, tenantDomainValidator);
            var baseSettings = new CoreBaseSettings(configuration);

            coreSettings = new CoreSettings(tenantService, baseSettings, configuration);

            userService         = new EFUserService(userDbContext);
            quotaService        = new DbQuotaService(coreDbContext);
            tariffService       = new TariffService(quotaService, tenantService, baseSettings, coreSettings, configuration, coreDbContext, tariffServiceStorage, options);
            clientTenantManager = new TenantManager(tenantService, quotaService, tariffService, null, baseSettings, coreSettings);
            settingsManager     = new DbSettingsManager(connectionString);
            TenantUtil          = tenantUtil;
            Region = region ?? string.Empty;
        }
Ejemplo n.º 2
0
 public CoreSettings(
     ITenantService tenantService,
     CoreBaseSettings coreBaseSettings,
     IConfiguration configuration)
 {
     TenantService    = tenantService;
     CoreBaseSettings = coreBaseSettings;
     Configuration    = configuration;
 }
Ejemplo n.º 3
0
 public ConfigureCoreSettings(
     IOptionsSnapshot <CachedTenantService> tenantService,
     CoreBaseSettings coreBaseSettings,
     IConfiguration configuration
     )
 {
     TenantService    = tenantService;
     CoreBaseSettings = coreBaseSettings;
     Configuration    = configuration;
 }
Ejemplo n.º 4
0
 public TenantManager(
     ITenantService tenantService,
     IQuotaService quotaService,
     ITariffService tariffService,
     IHttpContextAccessor httpContextAccessor,
     CoreBaseSettings coreBaseSettings,
     CoreSettings coreSettings) : this(tenantService, quotaService, tariffService, coreBaseSettings, coreSettings)
 {
     HttpContextAccessor = httpContextAccessor;
 }
Ejemplo n.º 5
0
 public TenantManager(
     ITenantService tenantService,
     IQuotaService quotaService,
     ITariffService tariffService,
     CoreBaseSettings coreBaseSettings,
     CoreSettings coreSettings)
 {
     TenantService    = tenantService;
     QuotaService     = quotaService;
     TariffService    = tariffService;
     CoreBaseSettings = coreBaseSettings;
     CoreSettings     = coreSettings;
 }
Ejemplo n.º 6
0
 public TenantManager(
     ITenantService tenantService,
     IQuotaService quotaService,
     ITariffService tariffService,
     IHttpContextAccessor httpContextAccessor,
     CoreBaseSettings coreBaseSettings,
     CoreSettings coreSettings)
 {
     TenantService    = tenantService;
     QuotaService     = quotaService;
     TariffService    = tariffService;
     CoreBaseSettings = coreBaseSettings;
     CoreSettings     = coreSettings;
     HttpContext      = httpContextAccessor?.HttpContext;
 }
Ejemplo n.º 7
0
 public ConfigureTenantManager(
     IOptionsSnapshot <CachedTenantService> tenantService,
     IOptionsSnapshot <CachedQuotaService> quotaService,
     IOptionsSnapshot <TariffService> tariffService,
     IHttpContextAccessor httpContextAccessor,
     CoreBaseSettings coreBaseSettings,
     CoreSettings coreSettings
     )
 {
     TenantService       = tenantService;
     QuotaService        = quotaService;
     TariffService       = tariffService;
     HttpContextAccessor = httpContextAccessor;
     CoreBaseSettings    = coreBaseSettings;
     CoreSettings        = coreSettings;
 }
Ejemplo n.º 8
0
        //TODO:fix
        public HostedSolution(
            IConfiguration configuration,
            TenantDomainValidator tenantDomainValidator,
            TimeZoneConverter timeZoneConverter,
            DbRegistry dbRegistry,
            ConnectionStringSettings connectionString,
            TariffServiceStorage tariffServiceStorage,
            IOptionsMonitor <ILog> options,
            string region)
        {
            tenantService = new DbTenantService(null, null, null);
            var baseSettings = new CoreBaseSettings(configuration);

            coreSettings = new CoreSettings(tenantService, baseSettings, configuration);

            userService         = new DbUserService(null);
            quotaService        = new DbQuotaService(null);
            tariffService       = new TariffService(quotaService, tenantService, baseSettings, coreSettings, configuration, null, tariffServiceStorage, options);
            clientTenantManager = new TenantManager(tenantService, quotaService, tariffService, null, baseSettings, coreSettings);
            settingsManager     = new DbSettingsManager(connectionString);
            Region = region ?? string.Empty;
            DbId   = connectionString.Name;
        }