Udostępnij za pośrednictwem


DatabaseLogFormatter.GetStopwatch(DbCommandInterceptionContext) Metoda

Definicja

Stoper używany do wykonywania czasu. Ten stoper jest uruchamiany na końcu NonQueryExecuting(DbCommand, DbCommandInterceptionContext<Int32>)metod , ScalarExecuting(DbCommand, DbCommandInterceptionContext<Object>)i ReaderExecuting(DbCommand, DbCommandInterceptionContext<DbDataReader>) jest zatrzymywany na początku NonQueryExecuted(DbCommand, DbCommandInterceptionContext<Int32>)metod , ScalarExecuted(DbCommand, DbCommandInterceptionContext<Object>)i ReaderExecuted(DbCommand, DbCommandInterceptionContext<DbDataReader>) . Jeśli te metody są zastępowane, a stoper jest używany, przesłonięcia powinny wywołać metodę podstawową lub uruchomić/zatrzymać sam stoper.

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

Parametry

interceptionContext
DbCommandInterceptionContext

Kontekst przechwytywania, dla którego zostanie uzyskany stoper.

Zwraca

Stoper.

Dotyczy