ConnectionCreatedEventData 构造函数

定义

构造事件有效负载。

public ConnectionCreatedEventData (Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase eventDefinition, Func<Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase,Microsoft.EntityFrameworkCore.Diagnostics.EventData,string> messageGenerator, System.Data.Common.DbConnection connection, Microsoft.EntityFrameworkCore.DbContext? context, Guid connectionId, DateTimeOffset startTime, TimeSpan duration);
new Microsoft.EntityFrameworkCore.Diagnostics.ConnectionCreatedEventData : Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase * Func<Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase, Microsoft.EntityFrameworkCore.Diagnostics.EventData, string> * System.Data.Common.DbConnection * Microsoft.EntityFrameworkCore.DbContext * Guid * DateTimeOffset * TimeSpan -> Microsoft.EntityFrameworkCore.Diagnostics.ConnectionCreatedEventData
Public Sub New (eventDefinition As EventDefinitionBase, messageGenerator As Func(Of EventDefinitionBase, EventData, String), connection As DbConnection, context As DbContext, connectionId As Guid, startTime As DateTimeOffset, duration As TimeSpan)

参数

eventDefinition
EventDefinitionBase

事件定义。

messageGenerator
Func<EventDefinitionBase,EventData,String>

生成此事件的日志消息的委托。

connection
DbConnection

DbConnection

context
DbContext

当前 DbContext 正在使用的 ,如果未知,则为 null。

connectionId
Guid

一个关联 ID,用于标识正在使用的 DbConnection 实例。

startTime
DateTimeOffset

此事件的开始时间。

duration
TimeSpan

此事件的持续时间。

适用于