Interface IRetryRule<TException>
- Namespace
- Executables.RetryRules
- Assembly
- executables.dll
Defines retry decision logic for a specific exception type.
public interface IRetryRule<in TException> where TException : Exception
Type Parameters
TExceptionException type handled by this rule.
Methods
ShouldRetry(int, TException, CancellationToken)
Decides whether failed invocation should be retried.
ValueTask<bool> ShouldRetry(int attemptsCount, TException exception, CancellationToken token)
Parameters
attemptsCountintNumber of failed attempts so far.
exceptionTExceptionException that caused current failure.
tokenCancellationTokenCancellation token for asynchronous rule work.