Exemple #1
0
        public bool CanRetry(Exception exception, out RetryContext <TContext> retryContext)
        {
            retryContext = new ImmediateRetryContext <TContext>(_policy, _context, exception, 1);

            return(_policy.IsHandled(exception));
        }
        public bool CanRetry(Exception exception, out RetryContext <TContext> retryContext)
        {
            retryContext = new ImmediateRetryContext <TContext>(_policy, Context, Exception, RetryCount + 1);

            return((RetryCount < _policy.RetryLimit) && _policy.Matches(exception));
        }
Exemple #3
0
        bool RetryContext <TContext> .CanRetry(Exception exception, out RetryContext <TContext> retryContext)
        {
            retryContext = new ImmediateRetryContext <TContext>(_policy, Context, Exception, RetryCount + 1, CancellationToken);

            return(RetryAttempt < _policy.RetryLimit && _policy.IsHandled(exception));
        }