SqlRetryLogicBaseProvider Class

Definition

Applies retry logic on an operation through the Execute or ExecuteAsync function.

public ref class SqlRetryLogicBaseProvider abstract
public abstract class SqlRetryLogicBaseProvider
type SqlRetryLogicBaseProvider = class
Public MustInherit Class SqlRetryLogicBaseProvider
Inheritance
SqlRetryLogicBaseProvider

Constructors

SqlRetryLogicBaseProvider()

Properties

Retrying

Occurs before applying the calculated delay time and executing the function on a next attempt.

RetryLogic

Defines the retry logic used to decide when to retry based on the encountered exception.

Methods

Execute<TResult>(Object, Func<TResult>)

Executes a function and applies retry logic, if enabled. Note: Exceptions will be reported via an aggregate exception if the execution isn't successful via retry attempts.

ExecuteAsync(Object, Func<Task>, CancellationToken)

Executes a function and applies retry logic, if enabled. The cancellation token can be used to request that the operation be abandoned before the execution attempts are exceeded. Note: Exceptions will be reported via the returned Task object, which will contain an aggregate exception if execution fails for all retry attempts.

ExecuteAsync<TResult>(Object, Func<Task<TResult>>, CancellationToken)

Executes a function and applies retry logic, if enabled. The cancellation token can be used to request that the operation be abandoned before the execution attempts are exceeded. Note: Exceptions will be reported via the returned Task object, which will contain an aggregate exception if execution fails for all retry attempts.

Applies to