Interface IRetryHandler
- Namespace
- DotNetQuery.Core
- Assembly
- DotNetQuery.Core.dll
Executes an async operation with retry logic applied according to the implementation's policy.
public interface IRetryHandler
Methods
ExecuteAsync<TData>(Func<CancellationToken, Task<TData>>, CancellationToken)
Executes the given action and retries it on failure according to the
configured retry policy.
Task<TData> ExecuteAsync<TData>(Func<CancellationToken, Task<TData>> action, CancellationToken cancellationToken = default)
Parameters
actionFunc<CancellationToken, Task<TData>>The async operation to execute, receiving a CancellationToken.
cancellationTokenCancellationTokenA token to cancel the operation.
Returns
- Task<TData>
The result of the action on success.
Type Parameters
TDataThe type of the value returned by the action.