Struct SqlDatabaseFactoryStatementEvent
Represents an event associates with an SQL statement that is to be ran during ISqlDatabase creation.
public readonly record struct SqlDatabaseFactoryStatementEvent : IEquatable<SqlDatabaseFactoryStatementEvent>
- Implements
- Inherited Members
Constructors
SqlDatabaseFactoryStatementEvent(SqlDatabaseFactoryStatementKey, string, TimeSpan, IReadOnlyList<KeyValuePair<string?, object?>>, SqlDatabaseFactoryStatementType, DateTime)
Represents an event associates with an SQL statement that is to be ran during ISqlDatabase creation.
public SqlDatabaseFactoryStatementEvent(SqlDatabaseFactoryStatementKey Key, string Sql, TimeSpan Timeout, IReadOnlyList<KeyValuePair<string?, object?>> Parameters, SqlDatabaseFactoryStatementType Type, DateTime UtcStartDate)
Parameters
Key
SqlDatabaseFactoryStatementKeyEvent's identifier.
Sql
stringSQL statement.
Timeout
TimeSpanCommand timeout.
Parameters
IReadOnlyList<KeyValuePair<string, object>>Collection of (name, value) pairs representing SQL command parameters.
Type
SqlDatabaseFactoryStatementTypeType of this event.
UtcStartDate
DateTimeUTC date and time representing the start of this SQL statement's execution.
Properties
Key
Event's identifier.
public SqlDatabaseFactoryStatementKey Key { get; init; }
Property Value
Parameters
Collection of (name, value) pairs representing SQL command parameters.
public IReadOnlyList<KeyValuePair<string?, object?>> Parameters { get; init; }
Property Value
Sql
SQL statement.
public string Sql { get; init; }
Property Value
Timeout
Command timeout.
public TimeSpan Timeout { get; init; }
Property Value
Type
Type of this event.
public SqlDatabaseFactoryStatementType Type { get; init; }
Property Value
UtcStartDate
UTC date and time representing the start of this SQL statement's execution.
public DateTime UtcStartDate { get; init; }
Property Value
Methods
Create(IDbCommand, SqlDatabaseFactoryStatementKey, SqlDatabaseFactoryStatementType)
Creates a new SqlDatabaseFactoryStatementEvent instance.
[Pure]
public static SqlDatabaseFactoryStatementEvent Create(IDbCommand command, SqlDatabaseFactoryStatementKey key, SqlDatabaseFactoryStatementType type)
Parameters
command
IDbCommandIDbCommand instance to create this event from.
key
SqlDatabaseFactoryStatementKeyEvent's identifier.
type
SqlDatabaseFactoryStatementTypeType of this event.