Compartir a través de


DatabaseLogFormatter.GetStopwatch(DbCommandInterceptionContext) Método

Definición

Cronómetro usado para las ejecuciones de tiempo. Este cronómetro se inicia al final de NonQueryExecuting(DbCommand, DbCommandInterceptionContext<Int32>)los métodos , ScalarExecuting(DbCommand, DbCommandInterceptionContext<Object>)y ReaderExecuting(DbCommand, DbCommandInterceptionContext<DbDataReader>) y se detiene al principio de los NonQueryExecuted(DbCommand, DbCommandInterceptionContext<Int32>)métodos , ScalarExecuted(DbCommand, DbCommandInterceptionContext<Object>)y ReaderExecuted(DbCommand, DbCommandInterceptionContext<DbDataReader>) . Si estos métodos se invalidan y se usa el cronómetro, las invalidaciones deben llamar al método base o iniciar o detener el cronómetro.

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

Contexto de interceptación para el que se obtendrá el cronómetro.

Devoluciones

Cronómetro.

Se aplica a