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