コード例 #1
0
 public TenantManager(
     ITenantService tenantService,
     IQuotaService quotaService,
     ITariffService tariffService,
     IHttpContextAccessor httpContextAccessor,
     CoreBaseSettings coreBaseSettings,
     CoreSettings coreSettings) : this(tenantService, quotaService, tariffService, coreBaseSettings, coreSettings)
 {
     HttpContextAccessor = httpContextAccessor;
 }
コード例 #2
0
ファイル: PaymentManager.cs プロジェクト: y2ket/AppServer
 public PaymentManager(CoreSettings config, TenantManager tenantManager, IQuotaService quotaService, ITariffService tariffService, IConfiguration configuration)
 {
     this.config        = config;
     TenantManager      = tenantManager;
     this.quotaService  = quotaService;
     this.tariffService = tariffService;
     Configuration      = configuration;
     partnerUrl         = (Configuration["core:payment:partners"] ?? "https://partners.onlyoffice.com/api").TrimEnd('/');
     partnerKey         = (Configuration["core:machinekey"] ?? "C5C1F4E85A3A43F5B3202C24D97351DF");
 }
コード例 #3
0
 public TenantManager(
     ITenantService tenantService,
     IQuotaService quotaService,
     ITariffService tariffService,
     CoreBaseSettings coreBaseSettings,
     CoreSettings coreSettings)
 {
     TenantService    = tenantService;
     QuotaService     = quotaService;
     TariffService    = tariffService;
     CoreBaseSettings = coreBaseSettings;
     CoreSettings     = coreSettings;
 }
コード例 #4
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;
 }
コード例 #5
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;
 }
コード例 #6
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;
        }
コード例 #7
0
 public string GetSetting(string key, int tenant = Tenant.DEFAULT_TENANT)
 {
     return(CoreSettings.GetSetting(key, tenant));
 }
コード例 #8
0
 public void SaveSetting(string key, string value, int tenant = Tenant.DEFAULT_TENANT)
 {
     CoreSettings.SaveSetting(key, value, tenant);
 }
コード例 #9
0
 public CoreConfiguration(CoreSettings coreSettings, TenantManager tenantManager, IConfiguration configuration)
 {
     CoreSettings  = coreSettings;
     TenantManager = tenantManager;
     Configuration = configuration;
 }
コード例 #10
0
 public string GetSetting(string key, int tenant = Tenant.DEFAULT_TENANT) => CoreSettings.GetSetting(key, tenant);