public virtual async Task <bool> HandleExceptionAsync(HandleExceptionArgs args) { // if the func returns true try to handle this current failed try if (HandleExceptionFunc != null && HandleExceptionFunc(args.Exception)) { return(await HandleAsync(args.SupportsRetry, args.CurrentFailedTry, args.CancellationToken) .ConfigureAwait(false)); } return(false); }
public virtual async Task<bool> HandleExceptionAsync(HandleExceptionArgs args) { // if the func returns true try to handle this current failed try if (HandleExceptionFunc != null && HandleExceptionFunc(args.Exception)) { return await HandleAsync(args.SupportsRetry, args.CurrentFailedTry, args.CancellationToken) .ConfigureAwait(false); } return false; }
public Task<bool> HandleExceptionAsync(HandleExceptionArgs args) { ++Calls; TaskCompletionSource<bool> tcs = new TaskCompletionSource<bool>(); tcs.SetResult(Handle); return tcs.Task; }
public virtual bool HandleException(HandleExceptionArgs args) { // if the func returns true try to handle this current failed try return(HandleExceptionFunc != null && HandleExceptionFunc(args.Exception) && Handle(args.SupportsRetry, args.CurrentFailedTry, args.CancellationToken)); }