public void Ctor_CanCreateSqlServerStorage_WithExistingConnection() { var connection = ConnectionUtils.CreateConnection(); var storage = new FirebirdStorage(connection, _options); Assert.NotNull(storage); }
public MsmqSqlServerStorageExtensionsFacts() { _storage = new FirebirdStorage( @"User=SYSDBA;Password=masterkey;Database=S:\Source\Hangfire.Firebird\HANGFIRE_MSMQ_TESTS.FDB;Packet Size=8192;DataSource=localhost;Port=3050;Dialect=3;Charset=NONE;ServerType=1;ClientLibrary=S:\Source\Hangfire.Firebird\Firebird\fbembed.dll;", new FirebirdStorageOptions { PrepareSchemaIfNecessary = false }); }
/// <summary> /// Tells the bootstrapper to use Fireibrd as a job storage, /// that can be accessed using the given connection string or /// its name. /// </summary> /// <param name="configuration">Configuration</param> /// <param name="nameOrConnectionString">Connection string or its name</param> public static FirebirdStorage UseFirebirdStorage( this IBootstrapperConfiguration configuration, string nameOrConnectionString) { var storage = new FirebirdStorage(nameOrConnectionString); configuration.UseStorage(storage); return storage; }
/// <summary> /// Tells the bootstrapper to use Fireibrd as a job storage, /// that can be accessed using the given connection string or /// its name. /// </summary> /// <param name="configuration">Configuration</param> /// <param name="nameOrConnectionString">Connection string or its name</param> public static FirebirdStorage UseFirebirdStorage( this IBootstrapperConfiguration configuration, string nameOrConnectionString) { var storage = new FirebirdStorage(nameOrConnectionString); configuration.UseStorage(storage); return(storage); }
public void GetConnection_ReturnsExistingConnection_WhenStorageUsesIt() { var connection = ConnectionUtils.CreateConnection(); var storage = new FirebirdStorage(connection, _options); using (var storageConnection = (FirebirdConnection)storage.GetConnection()) { Assert.Same(connection, storageConnection.Connection); Assert.False(storageConnection.OwnsConnection); } }
public static FirebirdStorage UseMsmqQueues(this FirebirdStorage storage, string pathPattern, params string[] queues) { if (storage == null) { throw new ArgumentNullException("storage"); } var provider = new MsmqJobQueueProvider(pathPattern, queues); storage.QueueProviders.Add(provider, queues); return(storage); }
public static FirebirdStorage UseMsmqQueues(this FirebirdStorage storage, string pathPattern) { return(UseMsmqQueues(storage, pathPattern, new [] { EnqueuedState.DefaultQueue })); }
private ExpirationManager CreateManager(FbConnection connection) { var storage = new FirebirdStorage(connection, _options); return(new ExpirationManager(storage, _options, TimeSpan.Zero)); }
private ExpirationManager CreateManager(FbConnection connection) { var storage = new FirebirdStorage(connection, _options); return new ExpirationManager(storage, _options, TimeSpan.Zero); }