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