Lingua

IRelationalCommandDiagnosticsLogger.CommandCanceledAsync Metodo

Definizione

Overload

CommandCanceledAsync(IRelationalConnection, DbCommand, DbContext, DbCommandMethod, Guid, Guid, DateTimeOffset, TimeSpan, CommandSource, CancellationToken)

Origine:
IRelationalCommandDiagnosticsLogger.cs
Origine:
IRelationalCommandDiagnosticsLogger.cs
Origine:
IRelationalCommandDiagnosticsLogger.cs

Registra l'evento CommandCanceled .

public System.Threading.Tasks.Task CommandCanceledAsync(Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.Common.DbCommand command, Microsoft.EntityFrameworkCore.DbContext? context, Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod executeMethod, Guid commandId, Guid connectionId, DateTimeOffset startTime, TimeSpan duration, Microsoft.EntityFrameworkCore.Diagnostics.CommandSource commandSource, System.Threading.CancellationToken cancellationToken = default);
abstract member CommandCanceledAsync : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Data.Common.DbCommand * Microsoft.EntityFrameworkCore.DbContext * Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod * Guid * Guid * DateTimeOffset * TimeSpan * Microsoft.EntityFrameworkCore.Diagnostics.CommandSource * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function CommandCanceledAsync (connection As IRelationalConnection, command As DbCommand, context As DbContext, executeMethod As DbCommandMethod, commandId As Guid, connectionId As Guid, startTime As DateTimeOffset, duration As TimeSpan, commandSource As CommandSource, Optional cancellationToken As CancellationToken = Nothing) As Task

Parametri

connection
IRelationalConnection

Connessione.

command
DbCommand

Oggetto comando di database.

context
DbContext

Oggetto DbContext attualmente in uso, per null se non noto.

executeMethod
DbCommandMethod

Rappresenta il metodo che verrà chiamato per eseguire il comando.

commandId
Guid

ID di correlazione associato all'oggetto specificato DbCommand.

connectionId
Guid

ID di correlazione associato all'oggetto DbConnection utilizzato.

startTime
DateTimeOffset

Ora di inizio dell'esecuzione.

duration
TimeSpan

Quantità di tempo trascorsa fino a quando non viene generata l'eccezione.

commandSource
CommandSource

Origine del comando.

cancellationToken
CancellationToken

Oggetto CancellationToken da osservare durante l'attesa del completamento dell'attività.

Valori restituiti

Oggetto Task che rappresenta l'operazione asincrona.

Eccezioni

Se l'oggetto CancellationToken viene annullato.

Si applica a

CommandCanceledAsync(IRelationalConnection, DbCommand, String, DbContext, DbCommandMethod, Guid, Guid, DateTimeOffset, TimeSpan, CommandSource, CancellationToken)

Origine:
IRelationalCommandDiagnosticsLogger.cs
Origine:
IRelationalCommandDiagnosticsLogger.cs

Registra l'evento CommandCanceled .

public System.Threading.Tasks.Task CommandCanceledAsync(Microsoft.EntityFrameworkCore.Storage.IRelationalConnection connection, System.Data.Common.DbCommand command, string logCommandText, Microsoft.EntityFrameworkCore.DbContext? context, Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod executeMethod, Guid commandId, Guid connectionId, DateTimeOffset startTime, TimeSpan duration, Microsoft.EntityFrameworkCore.Diagnostics.CommandSource commandSource, System.Threading.CancellationToken cancellationToken = default);
abstract member CommandCanceledAsync : Microsoft.EntityFrameworkCore.Storage.IRelationalConnection * System.Data.Common.DbCommand * string * Microsoft.EntityFrameworkCore.DbContext * Microsoft.EntityFrameworkCore.Diagnostics.DbCommandMethod * Guid * Guid * DateTimeOffset * TimeSpan * Microsoft.EntityFrameworkCore.Diagnostics.CommandSource * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function CommandCanceledAsync (connection As IRelationalConnection, command As DbCommand, logCommandText As String, context As DbContext, executeMethod As DbCommandMethod, commandId As Guid, connectionId As Guid, startTime As DateTimeOffset, duration As TimeSpan, commandSource As CommandSource, Optional cancellationToken As CancellationToken = Nothing) As Task

Parametri

connection
IRelationalConnection

Connessione.

command
DbCommand

Oggetto comando di database.

logCommandText
String

Testo del comando che può essere registrato.

context
DbContext

Oggetto DbContext attualmente in uso, per null se non noto.

executeMethod
DbCommandMethod

Rappresenta il metodo che verrà chiamato per eseguire il comando.

commandId
Guid

ID di correlazione associato all'oggetto specificato DbCommand.

connectionId
Guid

ID di correlazione associato all'oggetto DbConnection utilizzato.

startTime
DateTimeOffset

Ora di inizio dell'esecuzione.

duration
TimeSpan

Periodo di tempo trascorso fino all'annullamento del comando.

commandSource
CommandSource

Origine del comando.

cancellationToken
CancellationToken

Oggetto CancellationToken da osservare durante l'attesa del completamento dell'attività.

Valori restituiti

Oggetto Task che rappresenta l'operazione asincrona.

Eccezioni

Se l'oggetto CancellationToken viene annullato.

Si applica a