DatabaseLogFormatter.GetStopwatch(DbCommandInterceptionContext) Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Chronomètre utilisé pour chronomètre des exécutions. Ce chronomètre est démarré à la fin des NonQueryExecuting(DbCommand, DbCommandInterceptionContext<Int32>)méthodes , ScalarExecuting(DbCommand, DbCommandInterceptionContext<Object>)et ReaderExecuting(DbCommand, DbCommandInterceptionContext<DbDataReader>) et est arrêté au début des NonQueryExecuted(DbCommand, DbCommandInterceptionContext<Int32>)méthodes , ScalarExecuted(DbCommand, DbCommandInterceptionContext<Object>)et .ReaderExecuted(DbCommand, DbCommandInterceptionContext<DbDataReader>) Si ces méthodes sont remplacées et que le chronomètre est utilisé, les remplacements doivent appeler la méthode de base ou démarrer/arrêter le chronomètre eux-mêmes.
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
Paramètres
- interceptionContext
- DbCommandInterceptionContext
Contexte d’interception pour lequel le chronomètre sera obtenu.
Retours
Chronomètre.