Table of Contents

Interface ISqlServerCdcConnectionBuilder

Namespace
Excalibur.Cdc.SqlServer
Assembly
Excalibur.Cdc.SqlServer.dll

Defines the contract for configuring SQL Server CDC source and state store connections.

public interface ISqlServerCdcConnectionBuilder
Extension Methods

Methods

BindConfiguration(string)

Binds SQL Server CDC source options from an IConfiguration section.

ISqlServerCdcBuilder BindConfiguration(string sectionPath)

Parameters

sectionPath string

The configuration section path (e.g., "Cdc:Source").

Returns

ISqlServerCdcBuilder

The builder for fluent chaining.

Exceptions

ArgumentException

Thrown when sectionPath is null or whitespace.

ConnectionFactory(Func<IServiceProvider, Func<SqlConnection>>)

Sets a factory function that creates SQL connections for the CDC source database.

ISqlServerCdcBuilder ConnectionFactory(Func<IServiceProvider, Func<SqlConnection>> connectionFactory)

Parameters

connectionFactory Func<IServiceProvider, Func<SqlConnection>>

A factory function that creates SQL connections.

Returns

ISqlServerCdcBuilder

The builder for fluent chaining.

Exceptions

ArgumentNullException

Thrown when connectionFactory is null.

ConnectionString(string)

Sets the connection string for the SQL Server CDC source database.

ISqlServerCdcBuilder ConnectionString(string connectionString)

Parameters

connectionString string

The SQL Server connection string.

Returns

ISqlServerCdcBuilder

The builder for fluent chaining.

Exceptions

ArgumentException

Thrown when connectionString is null or whitespace.

ConnectionStringName(string)

Resolves the source connection string from IConfiguration.GetConnectionString(name) at service resolution time.

ISqlServerCdcBuilder ConnectionStringName(string name)

Parameters

name string

The connection string name in the ConnectionStrings section.

Returns

ISqlServerCdcBuilder

The builder for fluent chaining.

Exceptions

ArgumentException

Thrown when name is null or whitespace.

WithStateStore(Action<ICdcRelationalStateStoreBuilder>)

Configures a separate connection for CDC state persistence.

ISqlServerCdcBuilder WithStateStore(Action<ICdcRelationalStateStoreBuilder> configure)

Parameters

configure Action<ICdcRelationalStateStoreBuilder>

An action to configure state store connection, schema, and table settings.

Returns

ISqlServerCdcBuilder

The builder for fluent chaining.

Exceptions

ArgumentNullException

Thrown when configure is null.