/// <summary> /// Subscribe to event with special behavior when handler failed. If it fails with TException - onFail is called /// </summary> public static Delegate <TEvent> AddOnFail <TEvent, TException>(this Delegate <TEvent> handler, ICanHandle <TEvent> onFailHandler, OnException.DelegateInterface onException = null) where TException : Exception { return(AddOnFail <TEvent, TException>(handler, (a, e) => onFailHandler.Handle(a), onException)); }
/// <summary> /// Subscribe to event with special behavior when handler failed. If it fails with TException - onFail is called /// </summary> public static Delegate <QueuedEvent <TEvent> > WhenRetryQueueFailed <TEvent>(this Delegate <QueuedEvent <TEvent> > handler, ICanHandle <QueuedEvent <TEvent> > onFailHandler) { return(WhenRetryQueueFailed <TEvent>(handler, (a, e) => onFailHandler.Handle(a))); }