次の方法で共有


IDbConnectionInterceptor.ConnectionFailedAsync メソッド

定義

接続の閉じ方が例外で失敗したときに呼び出されます。

public System.Threading.Tasks.Task ConnectionFailedAsync (System.Data.Common.DbConnection connection, Microsoft.EntityFrameworkCore.Diagnostics.ConnectionErrorEventData eventData, System.Threading.CancellationToken cancellationToken = default);
public virtual System.Threading.Tasks.Task ConnectionFailedAsync (System.Data.Common.DbConnection connection, Microsoft.EntityFrameworkCore.Diagnostics.ConnectionErrorEventData eventData, System.Threading.CancellationToken cancellationToken = default);
abstract member ConnectionFailedAsync : System.Data.Common.DbConnection * Microsoft.EntityFrameworkCore.Diagnostics.ConnectionErrorEventData * System.Threading.CancellationToken -> System.Threading.Tasks.Task
abstract member ConnectionFailedAsync : System.Data.Common.DbConnection * Microsoft.EntityFrameworkCore.Diagnostics.ConnectionErrorEventData * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.ConnectionFailedAsync : System.Data.Common.DbConnection * Microsoft.EntityFrameworkCore.Diagnostics.ConnectionErrorEventData * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function ConnectionFailedAsync (connection As DbConnection, eventData As ConnectionErrorEventData, Optional cancellationToken As CancellationToken = Nothing) As Task
Public Overridable Function ConnectionFailedAsync (connection As DbConnection, eventData As ConnectionErrorEventData, Optional cancellationToken As CancellationToken = Nothing) As Task

パラメーター

connection
DbConnection

接続。

eventData
ConnectionErrorEventData

接続に関するコンテキスト情報。

cancellationToken
CancellationToken

CancellationTokenタスクの完了を待機している間に観察する 。

戻り値

非同期操作を表す Task

例外

CancellationToken が取り消されている場合。

適用対象