Table of Contents

Interface IConnectionStringProvider

Namespace
Excalibur.Data.Persistence
Assembly
Excalibur.Data.Abstractions.dll

Provides connection string management for persistence providers.

public interface IConnectionStringProvider
Extension Methods

Methods

ConnectionStringExists(string)

Checks if a connection string exists.

bool ConnectionStringExists(string name)

Parameters

name string

The name of the connection string.

Returns

bool

True if the connection string exists; otherwise, false.

GetConnectionString(string)

Gets a connection string by name.

string GetConnectionString(string name)

Parameters

name string

The name of the connection string.

Returns

string

The connection string.

GetConnectionStringAsync(string, CancellationToken)

Gets a connection string asynchronously, potentially from a secure store.

Task<string> GetConnectionStringAsync(string name, CancellationToken cancellationToken)

Parameters

name string

The name of the connection string.

cancellationToken CancellationToken

The cancellation token.

Returns

Task<string>

The connection string.

GetConnectionStringNames()

Gets all available connection string names.

IEnumerable<string> GetConnectionStringNames()

Returns

IEnumerable<string>

Collection of connection string names.

SetConnectionString(string, string)

Sets a connection string.

void SetConnectionString(string name, string connectionString)

Parameters

name string

The name of the connection string.

connectionString string

The connection string value.