public AdminDatasetCategoryService(
     IUserContext userContext,
     IOptions <AppDbOptions> opts)
 {
     this.user = userContext;
     this.opts = opts.Value;
 }
示例#2
0
 public PreflightResourceReader(
     IOptions <AppDbOptions> options,
     IUserContext userContext)
 {
     opts = options.Value;
     user = userContext;
 }
 public AdminNetworkEndpointUpdater(
     IOptions <AppDbOptions> dbOptions,
     IUserContext user)
 {
     opts      = dbOptions.Value;
     this.user = user;
 }
 public AdminSpecializationGroupService(
     IOptions <AppDbOptions> options,
     IUserContext userContext)
 {
     opts = options.Value;
     user = userContext;
 }
示例#5
0
 public DatasetQueryFetcher(
     IUserContext userContext,
     IOptions <AppDbOptions> dbOptions)
 {
     user = userContext;
     opts = dbOptions.Value;
 }
示例#6
0
 public AdminConceptEventService(
     IOptions <AppDbOptions> options,
     IUserContext userContext)
 {
     opts = options.Value;
     user = userContext;
 }
示例#7
0
 public CohortCacheService(
     IOptions <AppDbOptions> appDbOptions,
     IOptions <CohortOptions> cohortOptions
     )
 {
     dbOptions          = appDbOptions.Value;
     this.cohortOptions = cohortOptions.Value;
 }
示例#8
0
 static IOptions<CompilerOptions> GetCompilerOptions()
 {
     var dbOpts = new AppDbOptions
     {
         ConnectionString = @"Server=fake;Database=LeafDB;Trusted_Connection=True"
     };
     return Options.Create(new CompilerOptions { AppDb = extractor.ExtractDatabase(dbOpts) });
 }
示例#9
0
文件: QueryService.cs 项目: umcu/leaf
 public QueryService(
     IUserContext userContext,
     IOptions <AppDbOptions> dbOpts
     )
 {
     user        = userContext;
     this.dbOpts = dbOpts.Value;
 }
 public ConnectionStringManager(IConfiguration configuration,
                                IConnectionStringBuilder connectionStringBuilder,
                                IOptionsSnapshot <AppDbOptions> optionsSnapshot)
 {
     this.configuration           = configuration;
     this.connectionStringBuilder = connectionStringBuilder;
     dbConnectionOptions          = optionsSnapshot.Value;
 }
示例#11
0
 public DatasetQueryFetcher(
     IUserContext userContext,
     IOptions <AppDbOptions> dbOptions,
     ILogger <DatasetQueryFetcher> logger)
 {
     user = userContext;
     log  = logger;
     opts = dbOptions.Value;
 }
示例#12
0
 public DemographicQueryService(
     IUserContext userContext,
     IOptions <AppDbOptions> options,
     ILogger <DemographicQueryService> logger)
 {
     user = userContext;
     opts = options.Value;
     log  = logger;
 }
示例#13
0
 public DatasetCompilerContextProvider(
     IUserContext userContext,
     IOptions <AppDbOptions> dbOptions,
     ILogger <DatasetCompilerContextProvider> logger)
 {
     user = userContext;
     log  = logger;
     opts = dbOptions.Value;
 }
示例#14
0
 public DemographicCompilerContextProvider(
     IUserContext userContext,
     IOptions <AppDbOptions> options,
     ILogger <DemographicCompilerContextProvider> logger)
 {
     user = userContext;
     opts = options.Value;
     log  = logger;
 }
示例#15
0
 public PreflightResourceReader(
     IOptions <AppDbOptions> options,
     IUserContext userContext,
     ILogger <PreflightResourceReader> logger)
 {
     opts = options.Value;
     user = userContext;
     log  = logger;
 }
示例#16
0
 public ConceptDatasetCompilerContextProvider(
     IUserContext userContext,
     IOptions <AppDbOptions> options,
     ILogger <ConceptDatasetCompilerContextProvider> logger)
 {
     user = userContext;
     opts = options.Value;
     log  = logger;
 }
 public AdminConceptEventService(
     ILogger <AdminConceptEventService> logger,
     IOptions <AppDbOptions> options,
     IUserContext userContext)
 {
     this.logger = logger;
     opts        = options.Value;
     user        = userContext;
 }
示例#18
0
 public AdminSpecializationGroupService(
     ILogger <AdminSpecializationGroupService> logger,
     IOptions <AppDbOptions> options,
     IUserContext userContext)
 {
     this.logger = logger;
     opts        = options.Value;
     user        = userContext;
 }
示例#19
0
 public NetworkEndpointService(
     IOptions <AppDbOptions> dbOptions,
     INetworkValidator networkValidator,
     ILogger <NetworkEndpointService> logger)
 {
     opts      = dbOptions.Value;
     validator = networkValidator;
     log       = logger;
 }
示例#20
0
 public CohortCacheService(
     IOptions <AppDbOptions> appDbOptions,
     IOptions <CohortOptions> cohortOptions,
     ILogger <CohortCacheService> logger
     )
 {
     dbOptions          = appDbOptions.Value;
     this.cohortOptions = cohortOptions.Value;
     log = logger;
 }
示例#21
0
 public QueryService(
     IUserContext userContext,
     IOptions <AppDbOptions> dbOpts,
     ILogger <QueryService> logger
     )
 {
     user        = userContext;
     this.dbOpts = dbOpts.Value;
     this.logger = logger;
 }
示例#22
0
 public ImportService(
     IOptions <AppDbOptions> dbOptions,
     ILogger <ImportService> logger,
     IUserContext user
     )
 {
     this.dbOptions = dbOptions.Value;
     this.logger    = logger;
     this.user      = user;
 }
示例#23
0
        public string Build(AppDbOptions ops, string dbName)
        {
            if (ops == null || string.IsNullOrEmpty(dbName))
            {
                NullArgument.Throw(argument: nameof(AppDbOptions));
            }

            return($"Username={ops.UserName};" +
                   $"Password={ops.Password};" +
                   $"Host={ops.Host};" +
                   $"Port={ops.Port};" +
                   $"Database={dbName}");
        }
 public ImportIdentifierMappingService(
     IOptions <ClinDbOptions> clinDbOpts,
     IOptions <AppDbOptions> appDbOpts,
     IOptions <CompilerOptions> opts,
     IOptions <CompilerOptions> compilerOptions,
     ILogger <ImportIdentifierMappingService> logger
     )
 {
     this.clinDbOpts = clinDbOpts.Value;
     this.appDbOpts  = appDbOpts.Value;
     this.opts       = opts.Value;
     this.logger     = logger;
 }
        public void IConnectionStringBuilderBuildsValidString()
        {
            var dbOps = new AppDbOptions()
            {
                Host     = "192.168.18.10",
                Password = "******",
                Port     = 5321,
                UserName = "******"
            };

            string dbName = "testDb";

            string connString = connStringBuilder.Build(dbOps, dbName);

            Assert.True(connString != null, "Connection string should not be null");
            Assert.True(connString.Contains(dbName), "Connection string should contain Database name");
            Assert.True(connString.Contains(dbOps.Host), "Connection string should contain Host");
            Assert.True(connString.Contains(dbOps.Password), "Connection string should contain Password");
            Assert.True(connString.Contains(dbOps.Port.ToString()), "Connection string should contain Port");
            Assert.True(connString.Contains(dbOps.UserName), "Connection string should contain UserName");
        }
示例#26
0
 public TokenBlacklistService(IOptions <AppDbOptions> dbOpts, ITokenBlacklistCache blacklistCache, ILogger <TokenBlacklistService> logger)
 {
     opts = dbOpts.Value;
     this.blacklistCache = blacklistCache;
     this.logger         = logger;
 }
示例#27
0
 public LoginSaver(IOptions <AppDbOptions> options)
 {
     opts = options.Value;
 }
示例#28
0
 public AdminPanelFilterService(IOptions <AppDbOptions> opts, IUserContext userContext)
 {
     this.opts = opts.Value;
     this.user = userContext;
 }
示例#29
0
 public TokenInvalidatedService(IOptions <AppDbOptions> dbOpts, IInvalidatedTokenCache invalidatedCache)
 {
     opts = dbOpts.Value;
     this.invalidatedCache = invalidatedCache;
 }
示例#30
0
 public AdminDatasetQueryService(IOptions <AppDbOptions> opts, IUserContext userContext)
 {
     this.opts = opts.Value;
     this.user = userContext;
 }