Language

TransactionHandler.MatchesParentContext メソッド

定義

指定されたインターセプト コンテキストにターゲット コンテキストが含まれているか、指定された接続がターゲット コンテキストで使用される接続と同じかどうかを確認します。

protected internal virtual bool MatchesParentContext(System.Data.Common.DbConnection connection, System.Data.Entity.Infrastructure.Interception.DbInterceptionContext interceptionContext);
abstract member MatchesParentContext : System.Data.Common.DbConnection * System.Data.Entity.Infrastructure.Interception.DbInterceptionContext -> bool
override this.MatchesParentContext : System.Data.Common.DbConnection * System.Data.Entity.Infrastructure.Interception.DbInterceptionContext -> bool
Protected Friend Overridable Function MatchesParentContext (connection As DbConnection, interceptionContext As DbInterceptionContext) As Boolean

パラメーター

connection
DbConnection

つながり。

interceptionContext
DbInterceptionContext

インターセプト コンテキスト。

戻り値

true 指定されたインターセプト コンテキストにターゲット コンテキストが含まれている場合、または指定されたインターセプト コンテキストにコンテキストが含まれていない場合に、指定された接続がターゲット コンテキストで使用される接続と同じである場合。それ以外の場合 false 。

注釈

このメソッドを呼び出すと、次のメソッドから参照されるすべての DbContext の初期化がトリガーされることに注意してください。 interceptionContext

適用対象