Skip to content

Commit

Permalink
Added IGlobalConfiguration overloads to UsePostgreSqlStorage (#47)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericgreenmix authored and vytautask committed Oct 27, 2016
1 parent 1a84d8a commit 3f8f7cb
Showing 1 changed file with 37 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,5 +58,41 @@ public static PostgreSqlStorage UsePostgreSqlStorage(

return storage;
}
}

/// <summary>
/// Tells the bootstrapper to use PostgreSQL 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 PostgreSqlStorage UsePostgreSqlStorage(
this IGlobalConfiguration configuration,
string nameOrConnectionString)
{
var storage = new PostgreSqlStorage(nameOrConnectionString);
configuration.UseStorage(storage);

return storage;
}

/// <summary>
/// Tells the bootstrapper to use PostgreSQL as a job storage
/// with the given options, that can be accessed using the specified
/// connection string or its name.
/// </summary>
/// <param name="configuration">Configuration</param>
/// <param name="nameOrConnectionString">Connection string or its name</param>
/// <param name="options">Advanced options</param>
public static PostgreSqlStorage UsePostgreSqlStorage(
this IGlobalConfiguration configuration,
string nameOrConnectionString,
PostgreSqlStorageOptions options)
{
var storage = new PostgreSqlStorage(nameOrConnectionString, options);
configuration.UseStorage(storage);

return storage;
}
}
}

0 comments on commit 3f8f7cb

Please sign in to comment.