Share via


ConnectionCreatedEventData Constructor

Definition

Constructs the event payload.

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)

Parameters

eventDefinition
EventDefinitionBase

The event definition.

messageGenerator
Func<EventDefinitionBase,EventData,String>

A delegate that generates a log message for this event.

connection
DbConnection

The DbConnection.

context
DbContext

The DbContext currently being used, to null if not known.

connectionId
Guid

A correlation ID that identifies the DbConnection instance being used.

startTime
DateTimeOffset

The start time of this event.

duration
TimeSpan

The duration this event.

Applies to