Table of Contents

Class DbConnectionEventHandler

Namespace
LfrlAnvil.Sql.Internal
Assembly
LfrlAnvil.Sql.Core.dll

Represents an object capable of attaching a collection of SqlDatabaseConnectionChangeEvent callbacks to DbConnection event handlers.

public sealed class DbConnectionEventHandler
Inheritance
DbConnectionEventHandler
Inherited Members

Constructors

DbConnectionEventHandler(ReadOnlyArray<Action<SqlDatabaseConnectionChangeEvent>>)

Creates a new DbConnectionEventHandler instance.

public DbConnectionEventHandler(ReadOnlyArray<Action<SqlDatabaseConnectionChangeEvent>> callbacks)

Parameters

callbacks ReadOnlyArray<Action<SqlDatabaseConnectionChangeEvent>>

Collection of SqlDatabaseConnectionChangeEvent callbacks.

Properties

Callbacks

Collection of SqlDatabaseConnectionChangeEvent callbacks.

public ReadOnlyArray<Action<SqlDatabaseConnectionChangeEvent>> Callbacks { get; }

Property Value

ReadOnlyArray<Action<SqlDatabaseConnectionChangeEvent>>

Methods

Attach(DbConnection)

Attaches the Callbacks to the provided connection.

public void Attach(DbConnection connection)

Parameters

connection DbConnection

DB connection.