Table of Contents

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

action Func<CancellationToken, Task<TData>>

The async operation to execute, receiving a CancellationToken.

cancellationToken CancellationToken

A token to cancel the operation.

Returns

Task<TData>

The result of the action on success.

Type Parameters

TData

The type of the value returned by the action.