Class DbConnectionEventHandler
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
Methods
Attach(DbConnection)
Attaches the Callbacks to the provided connection
.
public void Attach(DbConnection connection)
Parameters
connection
DbConnectionDB connection.