public SettingsServiceBase(IServiceProvider sp)
 {
     _sp               = sp;
     _settingsCache    = _sp.GetRequiredService <ISettingsCache>();
     _tenantIdAccessor = _sp.GetRequiredService <ITenantIdAccessor>();
     _repo             = _sp.GetRequiredService <ApplicationRepository>();
 }
Beispiel #2
0
        public UsersController(
            ApplicationRepository appRepo,
            AdminRepository adminRepo,
            IModelMetadataProvider metadataProvider,
            ILogger <UsersController> logger,
            IOptions <GlobalOptions> options,
            IServiceProvider serviceProvider,
            IEmailSender emailSender,
            EmailTemplatesProvider emailTemplates,
            IStringLocalizer <Strings> localizer,
            ITenantIdAccessor tenantIdAccessor,
            IBlobService blobService) : base(logger, localizer)
        {
            _appRepo          = appRepo;
            _adminRepo        = adminRepo;
            _tenantIdAccessor = tenantIdAccessor;
            _blobService      = blobService;
            _metadataProvider = metadataProvider;
            _logger           = logger;
            _emailSender      = emailSender;
            _emailTemplates   = emailTemplates;
            _options          = options.Value;
            _localizer        = localizer;

            // we use this trick since this is an optional dependency, it will resolve to null if
            // the embedded identity server is not enabled
            _userManager = (UserManager <EmbeddedIdentityServerUser>)serviceProvider.GetService(typeof(UserManager <EmbeddedIdentityServerUser>));
        }
 public ReconciliationService(ApplicationRepository repo, MetadataProvider metadata,
                              ITenantIdAccessor tenantIdAccessor, IStringLocalizer <Strings> localizer)
 {
     _repo             = repo;
     _metadata         = metadata;
     _tenantIdAccessor = tenantIdAccessor;
     _localizer        = localizer;
 }
Beispiel #4
0
 public ShardResolver(ITenantIdAccessor tenantIdAccessor, IServiceProvider serviceProvider,
                      IMemoryCache cache, IOptions <ShardResolverOptions> options, IOptions <AdminRepositoryOptions> adminOptions)
 {
     _tenantIdProvider = tenantIdAccessor;
     _serviceProvider  = serviceProvider;
     _cache            = cache;
     _adminOptions     = adminOptions.Value;
     _options          = options.Value;
 }
Beispiel #5
0
 public ShardResolver(ITenantIdAccessor tenantIdAccessor, AdminRepositoryLite repo,
                      IMemoryCache cache, IOptions <ShardResolverOptions> options, IOptions <AdminRepositoryOptions> adminOptions)
 {
     _tenantIdProvider = tenantIdAccessor;
     _repo             = repo;
     _cache            = cache;
     _adminOptions     = adminOptions.Value;
     _options          = options.Value;
 }
Beispiel #6
0
 public ApplicationApiFilter(IServiceProvider sp)
 {
     _appRepo              = sp.GetRequiredService <ApplicationRepository>();
     _tenantIdAccessor     = sp.GetRequiredService <ITenantIdAccessor>();
     _tenantInfoAccessor   = sp.GetRequiredService <ITenantInfoAccessor>();
     _externalUserAccessor = sp.GetRequiredService <IExternalUserAccessor>();
     _definitionsCache     = sp.GetRequiredService <IDefinitionsCache>();
     _settingsCache        = sp.GetRequiredService <ISettingsCache>();
     _serviceProvider      = sp;
 }
 public ApplicationApiFilter(ITenantIdAccessor tenantIdAccessor, ApplicationRepository appRepo, ITenantInfoAccessor tenantInfoAccessor,
                             IExternalUserAccessor externalUserAccessor, IServiceProvider serviceProvider, IDefinitionsCache definitionsCache, ISettingsCache settingsCache)
 {
     _appRepo              = appRepo;
     _tenantIdAccessor     = tenantIdAccessor;
     _tenantInfoAccessor   = tenantInfoAccessor;
     _externalUserAccessor = externalUserAccessor;
     _serviceProvider      = serviceProvider;
     _definitionsCache     = definitionsCache;
     _settingsCache        = settingsCache;
 }
Beispiel #8
0
 public SettingsController(ApplicationRepository repo,
                           ILogger <SettingsController> logger,
                           IStringLocalizer <Strings> localizer,
                           ISettingsCache settingsCache,
                           ITenantIdAccessor tenantIdAccessor)
 {
     _repo             = repo;
     _logger           = logger;
     _localizer        = localizer;
     _settingsCache    = settingsCache;
     _tenantIdAccessor = tenantIdAccessor;
 }
Beispiel #9
0
 public AgentsController(ILogger <AgentsController> logger, IStringLocalizer <Strings> localizer,
                         ApplicationRepository repo, ITenantIdAccessor tenantIdAccessor, IBlobService blobService,
                         IDefinitionsCache definitionsCache,
                         IModelMetadataProvider modelMetadataProvider) : base(logger, localizer)
 {
     _logger                = logger;
     _localizer             = localizer;
     _repo                  = repo;
     _tenantIdAccessor      = tenantIdAccessor;
     _blobService           = blobService;
     _definitionsCache      = definitionsCache;
     _modelMetadataProvider = modelMetadataProvider;
 }
Beispiel #10
0
 public DefinitionsModelMetadataProvider(
     ICompositeMetadataDetailsProvider detailsProvider,
     ITenantIdAccessor tenantIdAccessor,
     IHttpContextAccessor httpContextAccessor,
     IDefinitionsCache definitionsCache,
     ITenantInfoAccessor tenantInfoAccessor,
     IStringLocalizer <Strings> localizer) : base(detailsProvider)
 {
     _tenantIdAccessor    = tenantIdAccessor;
     _httpContextAccessor = httpContextAccessor;
     _definitionsCache    = definitionsCache;
     _tenantInfoAccessor  = tenantInfoAccessor;
     _localizer           = localizer;
 }
Beispiel #11
0
 public SettingsCache(ITenantIdAccessor tenantIdAccessor, IHttpContextAccessor contextAccessor)
 {
     _tenantIdAccessor = tenantIdAccessor;
     _contextAccessor  = contextAccessor;
 }
Beispiel #12
0
 public TenantInfoAccessor(IHttpContextAccessor contextAccessor, ITenantIdAccessor tenantIdProvider)
 {
     _contextAccessor  = contextAccessor;
     _tenantIdProvider = tenantIdProvider;
 }
Beispiel #13
0
 public SettingsCache(ITenantIdAccessor tenantIdAccessor)
 {
     _tenantIdAccessor = tenantIdAccessor;
 }
Beispiel #14
0
 public DefinitionsCache(ITenantIdAccessor tenantIdAccessor, IHttpContextAccessor contextAccessor)
 {
     _tenantIdAccessor = tenantIdAccessor;
     _contextAccessor  = contextAccessor;
 }
Beispiel #15
0
 public ServerNotificationsController(ApplicationRepository repo, ITenantIdAccessor tenantIdAccessor, IInstrumentationService instrumentation)
 {
     _repo             = repo;
     _tenantIdAccessor = tenantIdAccessor;
     _instrumentation  = instrumentation;
 }
Beispiel #16
0
 public DefinitionsCache(ITenantIdAccessor tenantIdAccessor)
 {
     _tenantIdAccessor = tenantIdAccessor;
 }