예제 #1
0
 public AdminRepository(IOptions <AdminRepositoryOptions> config, IExternalUserAccessor externalUserAccessor,
                        IClientInfoAccessor clientInfoAccessor, IStringLocalizer <Strings> localizer)
 {
     _connectionString     = config?.Value?.ConnectionString ?? throw new ArgumentException("The admin connection string was not supplied", nameof(config));
     _externalUserAccessor = externalUserAccessor;
     _clientInfoAccessor   = clientInfoAccessor;
     _localizer            = localizer;
 }
예제 #2
0
        // Constructor

        public CompaniesController(AdminRepository db, ILogger <CompaniesController> logger,
                                   IShardResolver shardResolver, IExternalUserAccessor externalUserAccessor, IClientInfoAccessor clientInfoAccessor)
        {
            _repo                 = db;
            _logger               = logger;
            _shardResolver        = shardResolver;
            _externalUserAccessor = externalUserAccessor;
            _clientInfoAccessor   = clientInfoAccessor;
        }
예제 #3
0
        //private readonly IShardResolver _shardResolver;
        //private readonly IClientInfoAccessor _clientInfoAccessor;
        //private readonly ITenantIdAccessor _tenantIdAccessor;

        public CompaniesService(AdminRepository db,
                                ILogger <CompaniesController> logger,
                                IExternalUserAccessor externalUserAccessor,
                                IServiceProvider serviceProvider)
        {
            _repo   = db;
            _logger = logger;
            _externalUserAccessor = externalUserAccessor;
            _serviceProvider      = serviceProvider;
        }
예제 #4
0
 public IdentityRepository(IOptions <EmbeddedIdentityServerOptions> config, IExternalUserAccessor externalUserAccessor,
                           IClientInfoAccessor clientInfoAccessor, IStringLocalizer <Strings> localizer, IInstrumentationService instrumentation, ILogger <IdentityRepository> logger)
 {
     _connectionString     = config?.Value?.ConnectionString ?? throw new ArgumentException("The identity connection string was not supplied", nameof(config));
     _externalUserAccessor = externalUserAccessor;
     _clientInfoAccessor   = clientInfoAccessor;
     _localizer            = localizer;
     _instrumentation      = instrumentation;
     _logger = logger;
 }
예제 #5
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;
 }
예제 #6
0
 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;
 }
예제 #7
0
 public WebServiceContextAccessor(IHttpContextAccessor accessor, IExternalUserAccessor exUserAccessor)
 {
     _accessor       = accessor;
     _exUserAccessor = exUserAccessor;
 }
예제 #8
0
 public AdminApiFilter(AdminRepository adminRepo, IExternalUserAccessor externalUserAccessor)
 {
     _adminRepo            = adminRepo;
     _externalUserAccessor = externalUserAccessor;
 }