Esempio n. 1
0
        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));
        }
Esempio n. 2
0
        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));
        }
Esempio n. 3
0
        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));
        }