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; }
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; }
/// <summary> /// /// </summary> /// <param name="quotaService"></param> /// <param name="db"></param> /// <param name="userInDeptRolesService"></param> /// <param name="userManager"></param> public ConfirmQuotaController(IQuotaService quotaService, IUnitOfWork db, IUserInDeptRolesService userInDeptRolesService, IApplicationUserManager userManager) { _db = db; _userInDeptRolesService = userInDeptRolesService; _userManager = userManager; _quotaService = quotaService; }
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; }
public CachedQuotaService(IQuotaService service) { if (service == null) { throw new ArgumentNullException("service"); } this.service = service; cache = AscCache.Memory; interval = new TrustInterval(); CacheExpiration = TimeSpan.FromMinutes(10); cacheNotify = AscCache.Notify; cacheNotify.Subscribe <QuotaCacheItem>((i, a) => { if (i.Key == KEY_QUOTA_ROWS) { interval.Expire(); } else if (i.Key == KEY_QUOTA) { cache.Remove(KEY_QUOTA); } }); }
public TariffService(ConnectionStringSettings connectionString, IQuotaService quotaService, ITenantService tenantService) : base(connectionString, null) { this.quotaService = quotaService; this.tenantService = tenantService; this.cache = new AspCache(); this.CacheExpiration = TimeSpan.FromSeconds(30); }
public FlexsController(IUnitOfWorkWebAPI _uow, IQuotaService _quotaService, IEmailSender _emailSender) { uow = _uow; quotaService = _quotaService; emailSender = _emailSender; }
public ClientPaymentManager(IConfigurationClient config, IQuotaService quotaService, ITariffService tariffService) { this.config = config; this.quotaService = quotaService; this.tariffService = tariffService; partnerUrl = (ConfigurationManager.AppSettings["core.payment-partners"] ?? "https://partners.onlyoffice.com/api").TrimEnd('/'); partnerKey = (ConfigurationManager.AppSettings["core.machinekey"] ?? "C5C1F4E85A3A43F5B3202C24D97351DF"); }
public ClientPaymentManager(IConfigurationClient config, IQuotaService quotaService, ITariffService tariffService) { this.config = config; this.quotaService = quotaService; this.tariffService = tariffService; partnerUrl = (ConfigurationManager.AppSettings["core.payment-partners"] ?? "https://partners.onlyoffice.com/api").TrimEnd('/'); partnerKey = (ConfigurationManager.AppSettings["core.machinekey"] ?? "C5C1F4E85A3A43F5B3202C24D97351DF"); }
public CachedQuotaService(DbQuotaService service, QuotaServiceCache quotaServiceCache) { this.service = service ?? throw new ArgumentNullException("service"); QuotaServiceCache = quotaServiceCache; cache = quotaServiceCache.Cache; interval = new TrustInterval(); CacheExpiration = TimeSpan.FromMinutes(10); cacheNotify = quotaServiceCache.CacheNotify; }
public TariffService(ConnectionStringSettings connectionString, IQuotaService quotaService, ITenantService tenantService) : base(connectionString, "tenant") { this.quotaService = quotaService; this.tenantService = tenantService; this.config = new CoreConfiguration(tenantService); this.cache = AscCache.Default; this.CacheExpiration = DEFAULT_CACHE_EXPIRATION; this.test = ConfigurationManager.AppSettings["core.payment-test"] == "true"; }
public HostedSolution(ConnectionStringSettings connectionString, string region) { tenantService = new DbTenantService(connectionString); userService = new DbUserService(connectionString); quotaService = new DbQuotaService(connectionString); tariffService = new TariffService(connectionString, quotaService, tenantService); clientTenantManager = new TenantManager(tenantService, quotaService, tariffService); Region = region ?? string.Empty; DbId = connectionString.Name; }
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"); }
public TariffService(ConnectionStringSettings connectionString, IQuotaService quotaService, ITenantService tenantService) : base(connectionString, "tenant") { this.quotaService = quotaService; this.tenantService = tenantService; config = new CoreConfiguration(tenantService); CacheExpiration = DEFAULT_CACHE_EXPIRATION; test = ConfigurationManagerExtension.AppSettings["core.payment-test"] == "true"; int.TryParse(ConfigurationManagerExtension.AppSettings["core.payment-delay"], out paymentDelay); }
public TariffService(ConnectionStringSettings connectionString, IQuotaService quotaService, ITenantService tenantService) : base(connectionString, "tenant") { this.quotaService = quotaService; this.tenantService = tenantService; this.config = new CoreConfiguration(tenantService); this.cache = AscCache.Default; this.CacheExpiration = DEFAULT_CACHE_EXPIRATION; this.test = ConfigurationManager.AppSettings["core.payment-test"] == "true"; }
public HostedSolution(ConnectionStringSettings connectionString, string region) { tenantService = new DbTenantService(connectionString); userService = new DbUserService(connectionString); quotaService = new DbQuotaService(connectionString); tariffService = new TariffService(connectionString, quotaService, tenantService); clientTenantManager = new TenantManager(tenantService, quotaService, tariffService); Region = region ?? string.Empty; DbId = connectionString.Name; }
public TenantManager( ITenantService tenantService, IQuotaService quotaService, ITariffService tariffService, IHttpContextAccessor httpContextAccessor, CoreBaseSettings coreBaseSettings, CoreSettings coreSettings) : this(tenantService, quotaService, tariffService, coreBaseSettings, coreSettings) { HttpContextAccessor = httpContextAccessor; }
public ClientTenantManager(ITenantService tenantService, IQuotaService quotaService, ITariffService tariffService) { this.tenantService = tenantService; this.quotaService = quotaService; this.tariffService = tariffService; thisCompAddresses.Add("localhost"); thisCompAddresses.Add(Dns.GetHostName().ToLowerInvariant()); thisCompAddresses.AddRange(Dns.GetHostAddresses("localhost").Select(a => a.ToString())); thisCompAddresses.AddRange(Dns.GetHostAddresses(Dns.GetHostName()).Select(a => a.ToString())); }
public TenantManager(ITenantService tenantService, IQuotaService quotaService, ITariffService tariffService) { this.tenantService = tenantService; this.quotaService = quotaService; this.tariffService = tariffService; thisCompAddresses.Add("localhost"); thisCompAddresses.Add(Dns.GetHostName().ToLowerInvariant()); thisCompAddresses.AddRange(Dns.GetHostAddresses("localhost").Select(a => a.ToString())); thisCompAddresses.AddRange(Dns.GetHostAddresses(Dns.GetHostName()).Select(a => a.ToString())); }
public CachedQuotaService(IQuotaService service) { if (service == null) throw new ArgumentNullException("service"); this.service = service; this.cache = new AspCache(); this.interval = new TrustInterval(); this.syncQuotaRows = 0; CacheExpiration = TimeSpan.FromMinutes(10); }
public TenantManager( ITenantService tenantService, IQuotaService quotaService, ITariffService tariffService, CoreBaseSettings coreBaseSettings, CoreSettings coreSettings) { TenantService = tenantService; QuotaService = quotaService; TariffService = tariffService; CoreBaseSettings = coreBaseSettings; CoreSettings = coreSettings; }
public CachedQuotaService(IQuotaService service) { if (service == null) { throw new ArgumentNullException("service"); } this.service = service; this.cache = new AspCache(); this.interval = new TrustInterval(); this.syncQuotaRows = 0; CacheExpiration = TimeSpan.FromMinutes(10); }
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; }
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; }
//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; }
public QuotasController(QuotaService quotaService) { _quotaService = quotaService; }
public QuotaViewModel(YesContext db, IQuotaService qs, QuotaObserverManager qom) { _db = db; _qs = qs; _qom = qom; }
public QuotaController(IQuotaService quotaService, IUnitOfWork db) { _db = db; _quotaService = quotaService; }
public RequestsController(IUnitOfWorkWebAPI _uow, IQuotaService _quotaService) { uow = _uow; quotaService = _quotaService; }