次の方法で共有


DatabaseLogFormatter.GetStopwatch(DbCommandInterceptionContext) メソッド

定義

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

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

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

戻り値

ストップウォッチ。

適用対象