Share via


DataReaderClosingEventData Constructor

Definition

Constructs a DiagnosticSource event payload for DataReaderClosing.

public DataReaderClosingEventData (Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase eventDefinition, Func<Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase,Microsoft.EntityFrameworkCore.Diagnostics.EventData,string> messageGenerator, System.Data.Common.DbCommand command, System.Data.Common.DbDataReader dataReader, Microsoft.EntityFrameworkCore.DbContext? context, Guid commandId, Guid connectionId, bool async, int recordsAffected, int readCount, DateTimeOffset startTime);
new Microsoft.EntityFrameworkCore.Diagnostics.DataReaderClosingEventData : Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase * Func<Microsoft.EntityFrameworkCore.Diagnostics.EventDefinitionBase, Microsoft.EntityFrameworkCore.Diagnostics.EventData, string> * System.Data.Common.DbCommand * System.Data.Common.DbDataReader * Microsoft.EntityFrameworkCore.DbContext * Guid * Guid * bool * int * int * DateTimeOffset -> Microsoft.EntityFrameworkCore.Diagnostics.DataReaderClosingEventData
Public Sub New (eventDefinition As EventDefinitionBase, messageGenerator As Func(Of EventDefinitionBase, EventData, String), command As DbCommand, dataReader As DbDataReader, context As DbContext, commandId As Guid, connectionId As Guid, async As Boolean, recordsAffected As Integer, readCount As Integer, startTime As DateTimeOffset)

Parameters

eventDefinition
EventDefinitionBase

The event definition.

messageGenerator
Func<EventDefinitionBase,EventData,String>

A delegate that generates a log message for this event.

command
DbCommand

The DbCommand that created the reader.

dataReader
DbDataReader

The DbDataReader that is being disposed.

context
DbContext

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

commandId
Guid

A correlation ID that identifies the DbCommand instance being used.

connectionId
Guid

A correlation ID that identifies the DbConnection instance being used.

async
Boolean

Indicates whether or not the command was executed asynchronously.

recordsAffected
Int32

Gets the number of rows changed, inserted, or deleted by execution of the SQL statement.

readCount
Int32

Gets the number of read operations performed by this reader.

startTime
DateTimeOffset

The time when the data reader was created.

Applies to