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(); }