Beispiel #1
0
        public bool CanRetry(Exception exception, out RetryContext <TContext> retryContext)
        {
            retryContext = new IntervalRetryContext <TContext>(_policy, Context, Exception, _retryCount + 1);

            return(_retryCount < _policy.Intervals.Length && _policy.IsHandled(exception));
        }
        bool RetryContext <TContext> .CanRetry(Exception exception, out RetryContext <TContext> retryContext)
        {
            retryContext = new IntervalRetryContext <TContext>(_policy, Context, Exception, RetryCount + 1, CancellationToken);

            return(RetryAttempt < _policy.Intervals.Length && _policy.IsHandled(exception));
        }
        public bool CanRetry(Exception exception, out RetryContext <TContext> retryContext)
        {
            retryContext = new IntervalRetryContext <TContext>(_policy, _context, exception, 1);

            return(_policy.Matches(exception));
        }