/// <summary> /// Initializes a new instance of the <see cref="JudgementRepository"/> class. /// </summary> /// <param name="databaseConnectionFactory"> /// The database connection factory. /// </param> /// <param name="logger"> /// The logger. /// </param> public JudgementRepository( IConnectionStringFactory databaseConnectionFactory, ILogger <JudgementRepository> logger) { this.databaseConnectionFactory = databaseConnectionFactory ?? throw new ArgumentNullException(nameof(databaseConnectionFactory)); this.logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public OrderAllocationRepository( IConnectionStringFactory connectionFactory, ILogger <OrderAllocationRepository> logger) { this._connectionFactory = connectionFactory ?? throw new ArgumentNullException(nameof(connectionFactory)); this._logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public DatabaseReleaseTool( string databaseScriptPath, IFileStructurePolicy createDatabasePolicy, IFileStructurePolicy fileStructurePolicy, IOutputLogger outputLogger, IConnectionStringFactory connectionStringFactory, IDatabaseConnectionFactory databaseConnectionFactory) { if (outputLogger == null) { throw new ArgumentNullException("outputLogger"); } if (string.IsNullOrEmpty(databaseScriptPath)) { throw new ArgumentException(@"Cannot be null or empty.", "databaseScriptPath"); } if (!Directory.Exists(databaseScriptPath)) { throw new DirectoryNotFoundException(string.Format("Path: {0} does not exist.", databaseScriptPath)); } _createDatabasePolicy = createDatabasePolicy; _fileStructurePolicy = fileStructurePolicy; _outputLogger = outputLogger; _connectionStringFactory = connectionStringFactory; _databaseConnectionFactory = databaseConnectionFactory; _databaseScriptsDirInfo = new DirectoryInfo(databaseScriptPath); }
public SystemProcessOperationRuleRunRepository( IConnectionStringFactory connectionFactory, ILogger <ISystemProcessOperationRuleRunRepository> logger) { this._dbConnectionFactory = connectionFactory ?? throw new ArgumentNullException(nameof(connectionFactory)); this._logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public TableReflector(IConnectionStringFactory connectionStringFactory, ITypeNameMapper typeNameMapper) { _tableReflectors = new Dictionary<DatabaseType, ITableReflector> { { DatabaseType.SqlServer, new SqlServerTableReflector(connectionStringFactory, typeNameMapper) }, { DatabaseType.MySql, new MySqlTableReflector(connectionStringFactory, typeNameMapper) } }; }
public TaskSchedulerRepository( IConnectionStringFactory dbConnectionFactory, ILogger <TaskSchedulerRepository> logger) { this._dbConnectionFactory = dbConnectionFactory ?? throw new ArgumentNullException(nameof(dbConnectionFactory)); this._logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public DbFactory(IMigrationController migrationController, IConnectionStringFactory connectionStringFactory, IDiskProvider diskProvider) { _migrationController = migrationController; _connectionStringFactory = connectionStringFactory; _diskProvider = diskProvider; }
public RuleRunDataRequestRepository( IConnectionStringFactory dbConnectionFactory, ILogger <RuleRunDataRequestRepository> logger) { this._dbConnectionFactory = dbConnectionFactory ?? throw new ArgumentNullException(nameof(dbConnectionFactory)); this._logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public DefaultConnectionFactory(IProviderTypeOptions options, IConnectionStringFactory stringFactory) { _stringFactory = stringFactory; _storage = new Dictionary <string, DbConnection>(); _dbProviderFactory = DbProviderFactories.GetFactory(options.ProviderType.ToString()); }
public SystemProcessOperationUploadFileRepository( IConnectionStringFactory dbConnectionFactory, ILogger <SystemProcessOperationUploadFileRepository> logger) { this._dbConnectionFactory = dbConnectionFactory ?? throw new ArgumentNullException(nameof(dbConnectionFactory)); this._logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public ReddeerMarketTimeBarRepository( IConnectionStringFactory dbConnectionFactory, ILogger <ReddeerMarketTimeBarRepository> logger) { this._dbConnectionFactory = dbConnectionFactory ?? throw new ArgumentNullException(nameof(dbConnectionFactory)); this._logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public FluentConfigurationFactory(IConnectionStringFactory connectionStringFactory) { _configurationFactories = new Dictionary<DatabaseType, IFluentConfigurationFactory> { { DatabaseType.SqlServer, new SqlServer2008FluentConfigurationFactory(connectionStringFactory) }, { DatabaseType.MySql, new MySqlFluentConfigurationFactory(connectionStringFactory) } }; }
public FileUploadOrdersRepository( IConnectionStringFactory dbConnectionFactory, ILogger <FileUploadOrdersRepository> logger) { this._dbConnectionFactory = dbConnectionFactory ?? throw new ArgumentNullException(nameof(dbConnectionFactory)); this._logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
public RuleAnalyticsUniverseRepository( IConnectionStringFactory dbConnectionFactory, ILogger <RuleAnalyticsUniverseRepository> logger) { this._dbConnectionFactory = dbConnectionFactory ?? throw new ArgumentNullException(nameof(dbConnectionFactory)); this._logger = logger ?? throw new ArgumentNullException(nameof(logger)); }
//hier data,anager implementeren public ContextFactory( IHttpContextAccessor httpContentAccessor, IOptions <DatabaseConnectionSettings> connectionOptions, IConnectionStringFactory connectionStringFactory) { this.httpContext = httpContentAccessor.HttpContext; this.connectionOptions = connectionOptions?.Value; this.connectionStringFactory = connectionStringFactory; }
public void Setup() { this._configuration = TestHelpers.Config(); this._logger = A.Fake <ILogger <OrdersRepository> >(); this._opCtx = A.Fake <ISystemProcessOperationContext>(); this._marketRepository = A.Fake <IReddeerMarketRepository>(); this._orderBrokerRepository = A.Fake <IOrderBrokerRepository>(); this._connectionStringFactory = A.Fake <IConnectionStringFactory>(); }
public UsersContext(IConnectionStringFactory connectionStringFactory) : base(new SQLiteDataProvider(), connectionStringFactory.GetConnectionString("users.db")) { var b = MappingSchema.GetFluentMappingBuilder(); b.Entity <User>().HasTableName("Users") .Property(n => n.Key).IsIdentity().IsPrimaryKey() .Property(n => n.TelegramId).IsNullable(); }
public async Task <DbConnection> OpenAsync(IConnectionStringFactory connectionStringFactory) { if (connectionStringFactory == null) { throw new ArgumentNullException(nameof(connectionStringFactory)); } var connectionString = await _connectionStringFactory.GetConnectionStringAsync(); return(await OpenAsync(connectionString)); }
public DbConnection Open(IConnectionStringFactory connectionStringFactory) { if (connectionStringFactory == null) { throw new ArgumentNullException(nameof(connectionStringFactory)); } var connectionString = _connectionStringFactory.GetConnectionString(); return(Open(connectionString)); }
public AppDatabaseSetupService(LoggingMigrationContext logDb, AppMigrationContext appDb, AppDbContext appDbContext, IConnectionStringFactory connectionStringFactory) { _logMigrationDb = logDb; _appMigrationDb = appDb; _appDbContext = appDbContext; _connectionStringFactory = connectionStringFactory; }
/// <summary> /// Create connection string for azure blob storage /// </summary> public static StorageConnectionString ForAzureFilesStorageWithSharedKey(this IConnectionStringFactory factory, string accountName, string accountKey) { var cs = new StorageConnectionString(KnownPrefix.AzureFilesStorage); cs.Parameters[KnownParameter.AccountName] = accountName; cs.Parameters[KnownParameter.KeyOrPassword] = accountKey; return(cs); }
public DbFactory(IMigrationController migrationController, IConnectionStringFactory connectionStringFactory, IDiskProvider diskProvider, IRestoreDatabase restoreDatabaseService) { _migrationController = migrationController; _connectionStringFactory = connectionStringFactory; _diskProvider = diskProvider; _restoreDatabaseService = restoreDatabaseService; }
public SqlServerDataComponentFactory(IConnectionStringFactory connectionStringFactory) : base() { _connectionFactory = connectionStringFactory == null ? new SqlServerConnectionFactory() : new SqlServerConnectionFactory(connectionStringFactory); _transactionFactory = new TransactionFactory(); _dataAdapterFactory = new SqlServerDataAdapterFactory(); _parameterFactory = new SqlServerParameterFactory(); }
public MongoRepositoryFactoryTests() { _connectionString = new ConnectionStringFactory(); _mongoRepository = new MongoRepositoryFactory(_connectionString); _logRepository = new LogsRepository(_mongoRepository); _playerRepository = new PlayerRepository(_mongoRepository); _baseRepository = new BaseRepository(_mongoRepository); _usefulLinkRepository = new UsefulLinkRepository(_mongoRepository); _userRepository = new UserRepository(_mongoRepository); _registrationService = new UserRegistrationService(_userRepository); }
public SqliteDataComponentFactory(SqliteTransientRetryPolicy retryPolicy, IConnectionStringFactory connectionStringFactory) : base() { _connectionFactory = connectionStringFactory == null ? new SqliteConnectionFactoryWithRetry(retryPolicy) : new SqliteConnectionFactoryWithRetry(retryPolicy, connectionStringFactory); _transactionFactory = new SqliteTransactionFactoryWithRetry(retryPolicy); _dataAdapterFactory = new SqliteDataAdapterFactory(); _parameterFactory = new SqliteParameterFactory(); }
protected BaseModelProcessor( IServerWrapperFactory serverFactory, IConnectionStringFactory connectionStringFactory, IRefreshFactory refreshFactory, ILogger logger) { _serverFactory = serverFactory; _connectionStringFactory = connectionStringFactory; _refreshFactory = refreshFactory; Logger = logger; }
public TransactionalModelProcessor( IServerWrapperFactory serverFactory, IConnectionStringFactory connectionStringFactory, IRefreshFactory refreshFactory, IDataSourceFactory dataSourceFactory, ILogger logger) : base( serverFactory, connectionStringFactory, refreshFactory, logger) { _dataSourceFactory = dataSourceFactory; }
public SQLiteMigrationHelper(IConnectionStringFactory connectionStringFactory, Logger logger) { try { _connection = new SQLiteConnection(connectionStringFactory.MainDbConnectionString); _connection.Open(); } catch (Exception e) { logger.ErrorException("Couldn't open database " + connectionStringFactory.MainDbConnectionString, e); throw; } }
public MongoRepositoryFactory(IConnectionStringFactory connectionStringFactory) { _connectionStringFactory = connectionStringFactory; var connectionString = _connectionStringFactory.GetConnectionString(); if (string.IsNullOrEmpty(connectionString) || string.IsNullOrWhiteSpace(connectionString)) { throw new ArgumentException("Connection string cannot be null or empty", "connectionString"); } _connectionString = connectionString; }
/// <summary> /// /// </summary> public static StorageConnectionString ForAzureDataLakeStorageWithAzureAd(this IConnectionStringFactory factory, string accountName, string tenantId, string applicationId, string applicationSecret) { var cs = new StorageConnectionString(KnownPrefix.AzureDataLakeGen2); cs.Parameters[KnownParameter.AccountName] = accountName; cs.Parameters[KnownParameter.TenantId] = tenantId; cs.Parameters[KnownParameter.ClientId] = applicationId; cs.Parameters[KnownParameter.ClientSecret] = applicationSecret; return(cs); }
public ReadingListContext(IConnectionStringFactory connectionStringFactory) : base(new SQLiteDataProvider(), connectionStringFactory.GetConnectionString("reading_list.db")) { var b = MappingSchema.GetFluentMappingBuilder(); b.Entity <ReadingListEntry>().HasTableName("ReadingListEntries") .Property(n => n.Key).IsIdentity().IsPrimaryKey() .Property(n => n.Author) .Property(n => n.Title) .Property(n => n.Status) .Property(n => n.ReadingStarted).IsNullable() .Property(n => n.ReadingCompleted).IsNullable() .Property(n => n.DaysReading).IsNotColumn(); }
/// <summary> /// Initializes a new instance of the <see cref="CarDealershipRepository"/> class. /// </summary> /// <param name="logger">The logger.</param> /// <param name="connectionStringFactory">The connection string factory.</param> /// <exception cref="System.ArgumentNullException"> /// logger /// or /// connectionStringFactory /// </exception> public CarDealershipRepository(ILog logger, IConnectionStringFactory connectionStringFactory) { if (logger == null) { throw new ArgumentNullException(nameof(logger)); } if (connectionStringFactory == null) { throw new ArgumentNullException(nameof(connectionStringFactory)); } this._logger = logger; this._connectionString = connectionStringFactory.GetLiveConnectionString(); }
public AgentRepository(IConnectionStringFactory connectionStringFactory, IDateTime dateTime) { _connectionStringFactory = connectionStringFactory; _dateTime = dateTime; }
public MsSqlDatabaseProviderFactory(IConnectionStringFactory connectionStringFactory) { this.connectionStringFactory = connectionStringFactory; databaseProvider = SqlClientFactory.Instance; }
public LockerRepository(IConnectionStringFactory connectionStringFactory) { _connectionStringFactory = connectionStringFactory; }
public SqlServerManager(IConnectionStringFactory connectionStringFactory) { this.ConnectionStringFactory = connectionStringFactory; }
public SqlDatabaseManager(IConnectionStringFactory connectionStringFactory, string databaseName) { this.DatabaseName = databaseName; this.ConnectionStringFactory = connectionStringFactory; }
public DbFactory(IMigrationController migrationController, IConnectionStringFactory connectionStringFactory) { _migrationController = migrationController; _connectionStringFactory = connectionStringFactory; }
public ParcelRepository(IConnectionStringFactory connectionFactory) { _connectionFactory = connectionFactory; }
public MySqlTableReflector(IConnectionStringFactory connectionStringFactory, ITypeNameMapper typeNameMapper) { _connectionStringFactory = connectionStringFactory; _typeNameMapper = typeNameMapper; }