bool RetryContext <TContext> .CanRetry(Exception exception, out RetryContext <TContext> retryContext) { retryContext = new IncrementalRetryContext <TContext>(_policy, Context, Exception, RetryCount + 1, _delay + _delayIncrement, _delayIncrement, CancellationToken); return(RetryAttempt < _policy.RetryLimit && _policy.IsHandled(exception)); }
public bool CanRetry(Exception exception, out RetryContext <TContext> retryContext) { retryContext = new IncrementalRetryContext <TContext>(_policy, _context, exception, 1, _policy.InitialInterval, _policy.IntervalIncrement); return(_policy.Matches(exception)); }
public bool CanRetry(Exception exception, out RetryContext <TContext> retryContext) { retryContext = new IncrementalRetryContext <TContext>(_policy, Context, Exception, _retryCount + 1, _delay + _delayIncrement, _delayIncrement); return(_retryCount < _policy.RetryLimit && _policy.IsHandled(exception)); }