Język

IRelationalCommandDiagnosticsLogger.CommandCanceledAsync Metoda

Definicja

Przeciążenia

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

Źródło:
IRelationalCommandDiagnosticsLogger.cs
Źródło:
IRelationalCommandDiagnosticsLogger.cs
Źródło:
IRelationalCommandDiagnosticsLogger.cs

Rejestruje zdarzenie 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

Parametry

connection
IRelationalConnection

Połączenie.

command
DbCommand

Obiekt polecenia bazy danych.

context
DbContext

DbContext Aktualnie używane wartości do wartości null, jeśli nie są znane.

executeMethod
DbCommandMethod

Reprezentuje metodę, która zostanie wywołana w celu wykonania polecenia.

commandId
Guid

Identyfikator korelacji skojarzony z danym DbCommandelementem .

connectionId
Guid

Identyfikator korelacji skojarzony z używanym elementem DbConnection .

startTime
DateTimeOffset

Czas rozpoczęcia egzekucji.

duration
TimeSpan

Czas, który upłynął do momentu zgłoszenia wyjątku.

commandSource
CommandSource

Źródło polecenia.

cancellationToken
CancellationToken

Element do CancellationToken obserwowania podczas oczekiwania na ukończenie zadania.

Zwraca

Reprezentująca Task operację asynchroniową.

Wyjątki

Jeśli element CancellationToken zostanie anulowany.

Dotyczy

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

Źródło:
IRelationalCommandDiagnosticsLogger.cs
Źródło:
IRelationalCommandDiagnosticsLogger.cs

Rejestruje zdarzenie 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

Parametry

connection
IRelationalConnection

Połączenie.

command
DbCommand

Obiekt polecenia bazy danych.

logCommandText
String

Tekst polecenia, który można zarejestrować.

context
DbContext

DbContext Aktualnie używane wartości do wartości null, jeśli nie są znane.

executeMethod
DbCommandMethod

Reprezentuje metodę, która zostanie wywołana w celu wykonania polecenia.

commandId
Guid

Identyfikator korelacji skojarzony z danym DbCommandelementem .

connectionId
Guid

Identyfikator korelacji skojarzony z używanym elementem DbConnection .

startTime
DateTimeOffset

Czas rozpoczęcia egzekucji.

duration
TimeSpan

Czas, który upłynął do momentu anulowania polecenia.

commandSource
CommandSource

Źródło polecenia.

cancellationToken
CancellationToken

Element do CancellationToken obserwowania podczas oczekiwania na ukończenie zadania.

Zwraca

Reprezentująca Task operację asynchroniową.

Wyjątki

Jeśli element CancellationToken zostanie anulowany.

Dotyczy