Idioma

DatabaseLogFormatter.GetStopwatch(DbCommandInterceptionContext) Método

Definição

O cronômetro usado para cronometrar execuções. Esse cronômetro é iniciado no final de NonQueryExecuting(DbCommand, DbCommandInterceptionContext<Int32>), ScalarExecuting(DbCommand, DbCommandInterceptionContext<Object>)e métodos e ReaderExecuting(DbCommand, DbCommandInterceptionContext<DbDataReader>) é interrompido no início do NonQueryExecuted(DbCommand, DbCommandInterceptionContext<Int32>), ScalarExecuted(DbCommand, DbCommandInterceptionContext<Object>)e ReaderExecuted(DbCommand, DbCommandInterceptionContext<DbDataReader>) métodos. Se esses métodos forem substituídos e o cronômetro estiver sendo usado, as substituições deverão chamar o método base ou iniciar/parar o cronômetro em si.

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

Parâmetros

interceptionContext
DbCommandInterceptionContext

O contexto de interceptação para o qual o cronômetro será obtido.

Retornos

O cronômetro.

Aplica-se a