Table of Contents

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

TException

Exception 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

attemptsCount int

Number of failed attempts so far.

exception TException

Exception that caused current failure.

token CancellationToken

Cancellation token for asynchronous rule work.

Returns

ValueTask<bool>

true to retry; otherwise false.