Language

DatabaseLogFormatter.GetStopwatch(DbCommandInterceptionContext) メソッド

定義

実行の時間に使用されるストップウォッチ。 このストップウォッチは、 NonQueryExecuting(DbCommand, DbCommandInterceptionContext<Int32>)、 ScalarExecuting(DbCommand, DbCommandInterceptionContext<Object>)、および ReaderExecuting(DbCommand, DbCommandInterceptionContext<DbDataReader>) メソッドの終了時に開始され、 NonQueryExecuted(DbCommand, DbCommandInterceptionContext<Int32>)、 ScalarExecuted(DbCommand, DbCommandInterceptionContext<Object>)、および ReaderExecuted(DbCommand, DbCommandInterceptionContext<DbDataReader>) メソッドの先頭で停止されます。 これらのメソッドがオーバーライドされ、ストップウォッチが使用されている場合、オーバーライドは基本メソッドを呼び出すか、ストップウォッチ自体を開始/停止する必要があります。

protected internal System.Diagnostics.Stopwatch GetStopwatch(System.Data.Entity.Infrastructure.Interception.DbCommandInterceptionContext interceptionContext);
member this.GetStopwatch : System.Data.Entity.Infrastructure.Interception.DbCommandInterceptionContext -> System.Diagnostics.Stopwatch
Protected Friend Function GetStopwatch (interceptionContext As DbCommandInterceptionContext) As Stopwatch

パラメーター

interceptionContext
DbCommandInterceptionContext

ストップウォッチが取得されるインターセプト コンテキスト。

戻り値

ストップウォッチ。

適用対象