public OracleStorage(Func <IDbConnection> connectionFactory, OracleStorageOptions options) { _connectionFactory = connectionFactory ?? throw new ArgumentNullException(nameof(connectionFactory)); _options = options; InitializeQueueProviders(); }
public OracleStorage(string connectionString, OracleStorageOptions options) { if (connectionString == null) { throw new ArgumentNullException(nameof(connectionString)); } _options = options ?? throw new ArgumentNullException(nameof(options)); if (IsConnectionString(connectionString)) { _connectionString = connectionString; } else { throw new ArgumentException($"Could not find connection string with name '{connectionString}' in application config file"); } if (options.PrepareSchemaIfNecessary) { using (var connection = CreateAndOpenConnection()) { OracleObjectsInstaller.Install(connection); } } InitializeQueueProviders(); }
public OracleStorage(Func <IDbConnection> connectionFactory, OracleStorageOptions options) { _connectionFactory = connectionFactory ?? throw new ArgumentNullException(nameof(connectionFactory)); _options = options ?? throw new ArgumentNullException(nameof(options)); PrepareSchemaIfNecessary(options); InitializeQueueProviders(); }
private void PrepareSchemaIfNecessary(OracleStorageOptions options) { if (options.PrepareSchemaIfNecessary) { using (var connection = CreateAndOpenConnection()) { OracleObjectsInstaller.Install(connection, options.SchemaName); } } }
public OracleStorage(string connectionString, OracleStorageOptions options) { if (connectionString == null) { throw new ArgumentNullException(nameof(connectionString)); } if (IsConnectionString(connectionString)) { _connectionString = connectionString; } else { throw new ArgumentException($"Could not find connection string with name '{connectionString}' in application config file"); } _options = options ?? throw new ArgumentNullException(nameof(options)); PrepareSchemaIfNecessary(options); InitializeQueueProviders(); }