Example #1
0
 private void ProcessOnLeaving(IEnumerable <ITandTarget <T> > targets, CallLeaveContext <T> callLeaveContext)
 {
     foreach (var tandTarget in targets)
     {
         OnLeaveMethod(tandTarget, callLeaveContext);
     }
 }
Example #2
0
 protected virtual void OnLeaveMethod(ITandTarget <T> target, CallLeaveContext <T> callLeaveContext)
 {
     try
     {
         target.OnLeaveMethod(callLeaveContext);
     }
     catch (Exception e)
     {
         _exceptionHandler?.Invoke(e);
     }
 }
Example #3
0
 public void OnLeaveMethod(CallLeaveContext <T> callLeaveContext)
 {
     _instanceHandle(callLeaveContext.Instance);
 }
Example #4
0
 public void OnLeaveMethod(CallLeaveContext <T> leaveContext)
 {
     _stopwatch.Stop();
     _resultHandler?.Invoke($"Total execution time: {_stopwatch.Elapsed}");
 }
 public void OnLeaveMethod(CallLeaveContext <ISampleService> leaveContext) => _onLeaveHandle(leaveContext);