Table of Contents

Class PersistentStoreBuilderExtensions

Namespace
Quartz
Assembly
Quartz.dll

Database-specific configuration for a persistent job store.

public static class PersistentStoreBuilderExtensions
Inheritance
PersistentStoreBuilderExtensions
Inherited Members

Remarks

Each method selects the driver delegate that speaks the right SQL dialect and the ADO.NET provider that talks to it, so a connection string is all a caller has to supply — the shape every Entity Framework Core user already knows.

The pairs that look redundant are not: UseMySql and UseMySqlConnector, like UseSqlite and UseSystemDataSqlite, choose between different ADO.NET drivers for the same database. In each pair the short name is the driver to reach for, and the longer name says which other driver it is.

Each of them also takes the driver's DbProviderFactory instead of only a connection string — UseSqlServer(SqlClientFactory.Instance, connectionString). That overload names no type: it asks the factory for connections rather than resolving the driver's types from strings, so it is the one a trimmed or ahead-of-time-compiled application uses. The others resolve the driver by name and say so.

Every provider therefore has the same three overloads, and UseOracle has a fourth. That is not an oversight: the name path reaches BindByName and OracleDbType.Blob by reflecting over the types the driver description names, and a factory names none, so the factory form of Oracle alone needs somewhere to say those two things in code. Oracle is the only driver Quartz ships a description for that needs either.

Methods

UseFirebird(IPersistentStoreBuilder, Action<DataSourceOptions>)

Stores the schedule in Firebird.

[RequiresUnreferencedCode("The driver is chosen by name, and Quartz names its connection, command and parameter types as strings, so a trimmed application has no guarantee they survived. Pass the driver's DbProviderFactory to the overload that takes one, or register a DbDataSource in the container.")]
public static IPersistentStoreBuilder UseFirebird(this IPersistentStoreBuilder builder, Action<DataSourceOptions> configure)

Parameters

builder IPersistentStoreBuilder
configure Action<DataSourceOptions>

Returns

IPersistentStoreBuilder

UseFirebird(IPersistentStoreBuilder, DbProviderFactory, string)

Stores the schedule in Firebird, reached through FirebirdSql.Data.FirebirdClient.FirebirdClientFactory.Instance.

public static IPersistentStoreBuilder UseFirebird(this IPersistentStoreBuilder builder, DbProviderFactory factory, string connectionString)

Parameters

builder IPersistentStoreBuilder
factory DbProviderFactory
connectionString string

Returns

IPersistentStoreBuilder

Remarks

The provider name still chooses the driver description — how parameters are spelled, and whether they bind by name — but only the half of it that names no type is read, because the factory supplies every object the store would otherwise have constructed. That is what makes this the overload a trimmed or ahead-of-time-compiled application uses: nothing on this path calls Type.GetType.

The provider is registered directly rather than assembled from DataSourceOptions, because a factory and a driver description are values only code can supply and options are bound from configuration. Putting them on the options type made the configuration binder's source generator — which a native AOT publish turns on, and which issue #3430 is about turning on everywhere — try to construct a DbProviderFactory from a configuration section.

UseFirebird(IPersistentStoreBuilder, string)

Stores the schedule in Firebird.

[RequiresUnreferencedCode("The driver is chosen by name, and Quartz names its connection, command and parameter types as strings, so a trimmed application has no guarantee they survived. Pass the driver's DbProviderFactory to the overload that takes one, or register a DbDataSource in the container.")]
public static IPersistentStoreBuilder UseFirebird(this IPersistentStoreBuilder builder, string connectionString)

Parameters

builder IPersistentStoreBuilder
connectionString string

Returns

IPersistentStoreBuilder

UseGenericDatabase(IPersistentStoreBuilder, DbProviderFactory, string, DbMetadata)

Stores the schedule in a database Quartz has no specific support for, reached through the driver's own factory and described in code.

public static IPersistentStoreBuilder UseGenericDatabase(this IPersistentStoreBuilder builder, DbProviderFactory factory, string connectionString, DbMetadata metadata)

Parameters

builder IPersistentStoreBuilder

The store being configured.

factory DbProviderFactory

The driver's factory, normally its Instance singleton.

connectionString string

The connection string.

metadata DbMetadata

The ADO.NET driver description.

Returns

IPersistentStoreBuilder

Remarks

The registration that names nothing at all: the factory supplies the connections, and the description says how the driver spells a parameter. It needs no provider name, because a provider name exists to look a description up and this one arrived.

A description here may still name the driver's types — nothing stops it, and ParameterDbTypePropertyName is how a blob gets the driver's own parameter type — but it does not have to, and a trimmed application should not:

store.UseGenericDatabase(MyFactory.Instance, connectionString, new DbMetadata
{
    ProductName = "My Database",
    ParameterNamePrefix = "@",
    UseParameterNamePrefixInParameterCollection = true,
    BindByName = true,
    ConfigureBinaryParameter = parameter => ((MyParameter) parameter).MyDbType = MyDbType.Blob,
});

UseGenericDatabase(IPersistentStoreBuilder, string, Action<DataSourceOptions>)

Stores the schedule in a database Quartz has no specific support for, using the generic SQL dialect.

[RequiresUnreferencedCode("The driver is chosen by name, and Quartz names its connection, command and parameter types as strings, so a trimmed application has no guarantee they survived. Pass the driver's DbProviderFactory to the overload that takes one, or register a DbDataSource in the container.")]
public static IPersistentStoreBuilder UseGenericDatabase(this IPersistentStoreBuilder builder, string provider, Action<DataSourceOptions> configure)

Parameters

builder IPersistentStoreBuilder

The store being configured.

provider string

The Quartz provider name identifying the ADO.NET driver.

configure Action<DataSourceOptions>

Configures the data source, for example a named connection string.

Returns

IPersistentStoreBuilder

UseGenericDatabase(IPersistentStoreBuilder, string, Action<DataSourceOptions>, Func<DbMetadata>)

Stores the schedule in a database Quartz ships no ADO.NET driver description for, describing both the data source and the driver in code.

public static IPersistentStoreBuilder UseGenericDatabase(this IPersistentStoreBuilder builder, string provider, Action<DataSourceOptions> configureDataSource, Func<DbMetadata> describeMetadata)

Parameters

builder IPersistentStoreBuilder

The store being configured.

provider string

The provider name the driver description is registered under.

configureDataSource Action<DataSourceOptions>

Configures the data source, for example a named connection string.

describeMetadata Func<DbMetadata>

Builds the ADO.NET driver description.

Returns

IPersistentStoreBuilder

UseGenericDatabase(IPersistentStoreBuilder, string, string)

Stores the schedule in a database Quartz has no specific support for, using the generic SQL dialect.

[RequiresUnreferencedCode("The driver is chosen by name, and Quartz names its connection, command and parameter types as strings, so a trimmed application has no guarantee they survived. Pass the driver's DbProviderFactory to the overload that takes one, or register a DbDataSource in the container.")]
public static IPersistentStoreBuilder UseGenericDatabase(this IPersistentStoreBuilder builder, string provider, string connectionString)

Parameters

builder IPersistentStoreBuilder

The store being configured.

provider string

The Quartz provider name identifying the ADO.NET driver.

connectionString string

The connection string.

Returns

IPersistentStoreBuilder

UseGenericDatabase(IPersistentStoreBuilder, string, string, Func<DbMetadata>)

Stores the schedule in a database Quartz ships no ADO.NET driver description for, describing the driver in code.

public static IPersistentStoreBuilder UseGenericDatabase(this IPersistentStoreBuilder builder, string provider, string connectionString, Func<DbMetadata> describeMetadata)

Parameters

builder IPersistentStoreBuilder

The store being configured.

provider string

The provider name the driver description is registered under.

connectionString string

The connection string.

describeMetadata Func<DbMetadata>

Builds the ADO.NET driver description.

Returns

IPersistentStoreBuilder

Examples

store.UseGenericDatabase("MyDatabase", connectionString, () => new DbMetadata
{
    ProductName = "My Database",
    AssemblyName = typeof(MyConnection).Assembly.FullName,
    ConnectionType = typeof(MyConnection),
    CommandType = typeof(MyCommand),
    ParameterType = typeof(MyParameter),
    ParameterDbType = typeof(MyDbType),
    ParameterDbTypePropertyName = nameof(MyParameter.MyDbType),
    ParameterNamePrefix = "@",
    ExceptionType = typeof(MyException),
    UseParameterNamePrefixInParameterCollection = true,
    BindByName = true,
    DbBinaryTypeName = "VarBinary",
});

Remarks

This is the code-first form of the quartz.dbprovider.<name>.* keys: it says which connection, command and parameter types to instantiate, how parameters are named, and which enum value means "binary column". Registering a description under a name Quartz already ships one for replaces it.

UseMySql(IPersistentStoreBuilder, Action<DataSourceOptions>)

Stores the schedule in MySQL, using the MySql.Data driver.

[RequiresUnreferencedCode("The driver is chosen by name, and Quartz names its connection, command and parameter types as strings, so a trimmed application has no guarantee they survived. Pass the driver's DbProviderFactory to the overload that takes one, or register a DbDataSource in the container.")]
public static IPersistentStoreBuilder UseMySql(this IPersistentStoreBuilder builder, Action<DataSourceOptions> configure)

Parameters

builder IPersistentStoreBuilder
configure Action<DataSourceOptions>

Returns

IPersistentStoreBuilder

UseMySql(IPersistentStoreBuilder, DbProviderFactory, string)

Stores the schedule in MySQL, reached through MySql.Data.MySqlClient.MySqlClientFactory.Instance.

public static IPersistentStoreBuilder UseMySql(this IPersistentStoreBuilder builder, DbProviderFactory factory, string connectionString)

Parameters

builder IPersistentStoreBuilder
factory DbProviderFactory
connectionString string

Returns

IPersistentStoreBuilder

Remarks

The provider name still chooses the driver description — how parameters are spelled, and whether they bind by name — but only the half of it that names no type is read, because the factory supplies every object the store would otherwise have constructed. That is what makes this the overload a trimmed or ahead-of-time-compiled application uses: nothing on this path calls Type.GetType.

The provider is registered directly rather than assembled from DataSourceOptions, because a factory and a driver description are values only code can supply and options are bound from configuration. Putting them on the options type made the configuration binder's source generator — which a native AOT publish turns on, and which issue #3430 is about turning on everywhere — try to construct a DbProviderFactory from a configuration section.

UseMySql(IPersistentStoreBuilder, string)

Stores the schedule in MySQL, using the MySql.Data driver.

[RequiresUnreferencedCode("The driver is chosen by name, and Quartz names its connection, command and parameter types as strings, so a trimmed application has no guarantee they survived. Pass the driver's DbProviderFactory to the overload that takes one, or register a DbDataSource in the container.")]
public static IPersistentStoreBuilder UseMySql(this IPersistentStoreBuilder builder, string connectionString)

Parameters

builder IPersistentStoreBuilder
connectionString string

Returns

IPersistentStoreBuilder

UseMySqlConnector(IPersistentStoreBuilder, Action<DataSourceOptions>)

Stores the schedule in MySQL, using the MySqlConnector driver.

[RequiresUnreferencedCode("The driver is chosen by name, and Quartz names its connection, command and parameter types as strings, so a trimmed application has no guarantee they survived. Pass the driver's DbProviderFactory to the overload that takes one, or register a DbDataSource in the container.")]
public static IPersistentStoreBuilder UseMySqlConnector(this IPersistentStoreBuilder builder, Action<DataSourceOptions> configure)

Parameters

builder IPersistentStoreBuilder
configure Action<DataSourceOptions>

Returns

IPersistentStoreBuilder

UseMySqlConnector(IPersistentStoreBuilder, DbProviderFactory, string)

Stores the schedule in MySQL, reached through MySqlConnector.MySqlConnectorFactory.Instance.

public static IPersistentStoreBuilder UseMySqlConnector(this IPersistentStoreBuilder builder, DbProviderFactory factory, string connectionString)

Parameters

builder IPersistentStoreBuilder
factory DbProviderFactory
connectionString string

Returns

IPersistentStoreBuilder

Remarks

The provider name still chooses the driver description — how parameters are spelled, and whether they bind by name — but only the half of it that names no type is read, because the factory supplies every object the store would otherwise have constructed. That is what makes this the overload a trimmed or ahead-of-time-compiled application uses: nothing on this path calls Type.GetType.

The provider is registered directly rather than assembled from DataSourceOptions, because a factory and a driver description are values only code can supply and options are bound from configuration. Putting them on the options type made the configuration binder's source generator — which a native AOT publish turns on, and which issue #3430 is about turning on everywhere — try to construct a DbProviderFactory from a configuration section.

UseMySqlConnector(IPersistentStoreBuilder, string)

Stores the schedule in MySQL, using the MySqlConnector driver.

[RequiresUnreferencedCode("The driver is chosen by name, and Quartz names its connection, command and parameter types as strings, so a trimmed application has no guarantee they survived. Pass the driver's DbProviderFactory to the overload that takes one, or register a DbDataSource in the container.")]
public static IPersistentStoreBuilder UseMySqlConnector(this IPersistentStoreBuilder builder, string connectionString)

Parameters

builder IPersistentStoreBuilder
connectionString string

Returns

IPersistentStoreBuilder

UseOracle(IPersistentStoreBuilder, Action<DataSourceOptions>)

Stores the schedule in Oracle.

[RequiresUnreferencedCode("The driver is chosen by name, and Quartz names its connection, command and parameter types as strings, so a trimmed application has no guarantee they survived. Pass the driver's DbProviderFactory to the overload that takes one, or register a DbDataSource in the container.")]
public static IPersistentStoreBuilder UseOracle(this IPersistentStoreBuilder builder, Action<DataSourceOptions> configure)

Parameters

builder IPersistentStoreBuilder
configure Action<DataSourceOptions>

Returns

IPersistentStoreBuilder

UseOracle(IPersistentStoreBuilder, DbProviderFactory, string)

Stores the schedule in Oracle, reached through Oracle.ManagedDataAccess.Client.OracleClientFactory.Instance.

public static IPersistentStoreBuilder UseOracle(this IPersistentStoreBuilder builder, DbProviderFactory factory, string connectionString)

Parameters

builder IPersistentStoreBuilder
factory DbProviderFactory
connectionString string

Returns

IPersistentStoreBuilder

Remarks

Oracle is the driver that needs UseOracle(IPersistentStoreBuilder, DbProviderFactory, string, Action<DbCommand>?, Action<DbParameter>?) rather than this overload for anything but the smallest job data: the managed driver binds parameters by position unless BindByName is set on its command, and it maps Binary to OracleDbType.Raw, which holds two kilobytes. Quartz names neither of those types, so an application that references the driver has to say it.

UseOracle(IPersistentStoreBuilder, DbProviderFactory, string, Action<DbCommand>?, Action<DbParameter>?)

Stores the schedule in Oracle, reached through its factory and told the two things only an application that references the driver can say.

public static IPersistentStoreBuilder UseOracle(this IPersistentStoreBuilder builder, DbProviderFactory factory, string connectionString, Action<DbCommand>? configureCommand, Action<DbParameter>? configureBinaryParameter)

Parameters

builder IPersistentStoreBuilder

The store being configured.

factory DbProviderFactory

The driver's factory, normally OracleClientFactory.Instance.

connectionString string

The connection string.

configureCommand Action<DbCommand>

Applied to every command, for BindByName.

configureBinaryParameter Action<DbParameter>

Applied to every blob parameter, for OracleDbType.

Returns

IPersistentStoreBuilder

Remarks

The name path reaches OracleCommand.BindByName and OracleParameter.OracleDbType by reflecting over the types the driver description names. A factory names none, so the two are said in code:

store.UseOracle(
    OracleClientFactory.Instance,
    connectionString,
    configureCommand: command => ((OracleCommand) command).BindByName = true,
    configureBinaryParameter: parameter => ((OracleParameter) parameter).OracleDbType = OracleDbType.Blob);

Both matter. Without the first, every statement binds its parameters by position and the store reads the wrong columns; without the second, a job data map larger than two kilobytes will not go in, because Binary is OracleDbType.Raw and not Blob. Oracle is the only driver Quartz ships a description for that needs either — this overload exists for it, and any other driver says the same things on its own DbMetadata through UseGenericDatabase(IPersistentStoreBuilder, DbProviderFactory, string, DbMetadata).

UseOracle(IPersistentStoreBuilder, string)

Stores the schedule in Oracle.

[RequiresUnreferencedCode("The driver is chosen by name, and Quartz names its connection, command and parameter types as strings, so a trimmed application has no guarantee they survived. Pass the driver's DbProviderFactory to the overload that takes one, or register a DbDataSource in the container.")]
public static IPersistentStoreBuilder UseOracle(this IPersistentStoreBuilder builder, string connectionString)

Parameters

builder IPersistentStoreBuilder
connectionString string

Returns

IPersistentStoreBuilder

UsePostgres(IPersistentStoreBuilder, Action<DataSourceOptions>)

Stores the schedule in PostgreSQL.

[RequiresUnreferencedCode("The driver is chosen by name, and Quartz names its connection, command and parameter types as strings, so a trimmed application has no guarantee they survived. Pass the driver's DbProviderFactory to the overload that takes one, or register a DbDataSource in the container.")]
public static IPersistentStoreBuilder UsePostgres(this IPersistentStoreBuilder builder, Action<DataSourceOptions> configure)

Parameters

builder IPersistentStoreBuilder
configure Action<DataSourceOptions>

Returns

IPersistentStoreBuilder

UsePostgres(IPersistentStoreBuilder, DbProviderFactory, string)

Stores the schedule in PostgreSQL, reached through Npgsql.NpgsqlFactory.Instance.

public static IPersistentStoreBuilder UsePostgres(this IPersistentStoreBuilder builder, DbProviderFactory factory, string connectionString)

Parameters

builder IPersistentStoreBuilder
factory DbProviderFactory
connectionString string

Returns

IPersistentStoreBuilder

Remarks

The provider name still chooses the driver description — how parameters are spelled, and whether they bind by name — but only the half of it that names no type is read, because the factory supplies every object the store would otherwise have constructed. That is what makes this the overload a trimmed or ahead-of-time-compiled application uses: nothing on this path calls Type.GetType.

The provider is registered directly rather than assembled from DataSourceOptions, because a factory and a driver description are values only code can supply and options are bound from configuration. Putting them on the options type made the configuration binder's source generator — which a native AOT publish turns on, and which issue #3430 is about turning on everywhere — try to construct a DbProviderFactory from a configuration section.

UsePostgres(IPersistentStoreBuilder, string)

Stores the schedule in PostgreSQL.

[RequiresUnreferencedCode("The driver is chosen by name, and Quartz names its connection, command and parameter types as strings, so a trimmed application has no guarantee they survived. Pass the driver's DbProviderFactory to the overload that takes one, or register a DbDataSource in the container.")]
public static IPersistentStoreBuilder UsePostgres(this IPersistentStoreBuilder builder, string connectionString)

Parameters

builder IPersistentStoreBuilder
connectionString string

Returns

IPersistentStoreBuilder

UseSqlServer(IPersistentStoreBuilder, Action<DataSourceOptions>)

Stores the schedule in Microsoft SQL Server.

[RequiresUnreferencedCode("The driver is chosen by name, and Quartz names its connection, command and parameter types as strings, so a trimmed application has no guarantee they survived. Pass the driver's DbProviderFactory to the overload that takes one, or register a DbDataSource in the container.")]
public static IPersistentStoreBuilder UseSqlServer(this IPersistentStoreBuilder builder, Action<DataSourceOptions> configure)

Parameters

builder IPersistentStoreBuilder
configure Action<DataSourceOptions>

Returns

IPersistentStoreBuilder

UseSqlServer(IPersistentStoreBuilder, DbProviderFactory, string)

Stores the schedule in Microsoft SQL Server, reached through Microsoft.Data.SqlClient.SqlClientFactory.Instance.

public static IPersistentStoreBuilder UseSqlServer(this IPersistentStoreBuilder builder, DbProviderFactory factory, string connectionString)

Parameters

builder IPersistentStoreBuilder
factory DbProviderFactory
connectionString string

Returns

IPersistentStoreBuilder

Remarks

The provider name still chooses the driver description — how parameters are spelled, and whether they bind by name — but only the half of it that names no type is read, because the factory supplies every object the store would otherwise have constructed. That is what makes this the overload a trimmed or ahead-of-time-compiled application uses: nothing on this path calls Type.GetType.

The provider is registered directly rather than assembled from DataSourceOptions, because a factory and a driver description are values only code can supply and options are bound from configuration. Putting them on the options type made the configuration binder's source generator — which a native AOT publish turns on, and which issue #3430 is about turning on everywhere — try to construct a DbProviderFactory from a configuration section.

UseSqlServer(IPersistentStoreBuilder, string)

Stores the schedule in Microsoft SQL Server.

[RequiresUnreferencedCode("The driver is chosen by name, and Quartz names its connection, command and parameter types as strings, so a trimmed application has no guarantee they survived. Pass the driver's DbProviderFactory to the overload that takes one, or register a DbDataSource in the container.")]
public static IPersistentStoreBuilder UseSqlServer(this IPersistentStoreBuilder builder, string connectionString)

Parameters

builder IPersistentStoreBuilder
connectionString string

Returns

IPersistentStoreBuilder

UseSqlite(IPersistentStoreBuilder, Action<DataSourceOptions>)

Stores the schedule in SQLite, using the Microsoft.Data.Sqlite driver.

[RequiresUnreferencedCode("The driver is chosen by name, and Quartz names its connection, command and parameter types as strings, so a trimmed application has no guarantee they survived. Pass the driver's DbProviderFactory to the overload that takes one, or register a DbDataSource in the container.")]
public static IPersistentStoreBuilder UseSqlite(this IPersistentStoreBuilder builder, Action<DataSourceOptions> configure)

Parameters

builder IPersistentStoreBuilder
configure Action<DataSourceOptions>

Returns

IPersistentStoreBuilder

Remarks

The modern driver, and what UseSqlite means: the short name goes to the default the way UseMySql does, and the way Entity Framework Core spells the same choice. The legacy System.Data.SQLite driver is UseSystemDataSqlite(IPersistentStoreBuilder, string).

UseSqlite(IPersistentStoreBuilder, DbProviderFactory, string)

Stores the schedule in SQLite, reached through Microsoft.Data.Sqlite.SqliteFactory.Instance.

public static IPersistentStoreBuilder UseSqlite(this IPersistentStoreBuilder builder, DbProviderFactory factory, string connectionString)

Parameters

builder IPersistentStoreBuilder
factory DbProviderFactory
connectionString string

Returns

IPersistentStoreBuilder

Remarks

The provider name still chooses the driver description — how parameters are spelled, and whether they bind by name — but only the half of it that names no type is read, because the factory supplies every object the store would otherwise have constructed. That is what makes this the overload a trimmed or ahead-of-time-compiled application uses: nothing on this path calls Type.GetType.

The provider is registered directly rather than assembled from DataSourceOptions, because a factory and a driver description are values only code can supply and options are bound from configuration. Putting them on the options type made the configuration binder's source generator — which a native AOT publish turns on, and which issue #3430 is about turning on everywhere — try to construct a DbProviderFactory from a configuration section.

UseSqlite(IPersistentStoreBuilder, string)

Stores the schedule in SQLite, using the Microsoft.Data.Sqlite driver.

[RequiresUnreferencedCode("The driver is chosen by name, and Quartz names its connection, command and parameter types as strings, so a trimmed application has no guarantee they survived. Pass the driver's DbProviderFactory to the overload that takes one, or register a DbDataSource in the container.")]
public static IPersistentStoreBuilder UseSqlite(this IPersistentStoreBuilder builder, string connectionString)

Parameters

builder IPersistentStoreBuilder
connectionString string

Returns

IPersistentStoreBuilder

Remarks

The modern driver, and what UseSqlite means: the short name goes to the default the way UseMySql does, and the way Entity Framework Core spells the same choice. The legacy System.Data.SQLite driver is UseSystemDataSqlite(IPersistentStoreBuilder, string).

UseSystemDataSqlite(IPersistentStoreBuilder, Action<DataSourceOptions>)

Stores the schedule in SQLite, using the legacy System.Data.SQLite driver.

[RequiresUnreferencedCode("The driver is chosen by name, and Quartz names its connection, command and parameter types as strings, so a trimmed application has no guarantee they survived. Pass the driver's DbProviderFactory to the overload that takes one, or register a DbDataSource in the container.")]
public static IPersistentStoreBuilder UseSystemDataSqlite(this IPersistentStoreBuilder builder, Action<DataSourceOptions> configure)

Parameters

builder IPersistentStoreBuilder
configure Action<DataSourceOptions>

Returns

IPersistentStoreBuilder

Remarks

Named after its driver rather than after the database, because UseSqlite(IPersistentStoreBuilder, string) is the one to reach for.

UseSystemDataSqlite(IPersistentStoreBuilder, DbProviderFactory, string)

Stores the schedule in SQLite, reached through System.Data.SQLite.SQLiteFactory.Instance.

public static IPersistentStoreBuilder UseSystemDataSqlite(this IPersistentStoreBuilder builder, DbProviderFactory factory, string connectionString)

Parameters

builder IPersistentStoreBuilder
factory DbProviderFactory
connectionString string

Returns

IPersistentStoreBuilder

Remarks

The provider name still chooses the driver description — how parameters are spelled, and whether they bind by name — but only the half of it that names no type is read, because the factory supplies every object the store would otherwise have constructed. That is what makes this the overload a trimmed or ahead-of-time-compiled application uses: nothing on this path calls Type.GetType.

The provider is registered directly rather than assembled from DataSourceOptions, because a factory and a driver description are values only code can supply and options are bound from configuration. Putting them on the options type made the configuration binder's source generator — which a native AOT publish turns on, and which issue #3430 is about turning on everywhere — try to construct a DbProviderFactory from a configuration section.

UseSystemDataSqlite(IPersistentStoreBuilder, string)

Stores the schedule in SQLite, using the legacy System.Data.SQLite driver.

[RequiresUnreferencedCode("The driver is chosen by name, and Quartz names its connection, command and parameter types as strings, so a trimmed application has no guarantee they survived. Pass the driver's DbProviderFactory to the overload that takes one, or register a DbDataSource in the container.")]
public static IPersistentStoreBuilder UseSystemDataSqlite(this IPersistentStoreBuilder builder, string connectionString)

Parameters

builder IPersistentStoreBuilder
connectionString string

Returns

IPersistentStoreBuilder

Remarks

Named after its driver rather than after the database, because UseSqlite(IPersistentStoreBuilder, string) is the one to reach for.