Esempio n. 1
0
 public static void Execute(this ApmMethodHandlerBase apmMethodHandlerBase, Action action)
 {
     apmMethodHandlerBase.OnActionExecuting();
     try
     {
         action();
     }
     finally
     {
         apmMethodHandlerBase.OnActionExecuted();
     }
 }
Esempio n. 2
0
 public static TResult Execute <TResult>(this ApmMethodHandlerBase apmMethodHandlerBase, Func <TResult> func)
 {
     apmMethodHandlerBase.OnActionExecuting();
     try
     {
         return(func());
     }
     finally
     {
         apmMethodHandlerBase.OnActionExecuted();
     }
 }