Microsoft.Rest.TransientFaultHandling.RetryPolicy
Provides the base implementation of the retry mechanism for unreliable actions and
transient conditions.
Gets the instance of the error detection strategy.
Get delegate count associated with the event
Gets the retry strategy.
An instance of a callback delegate that will be invoked whenever a retry condition is encountered.
public RetryPolicy(ITransientErrorDetectionStrategy errorDetectionStrategy, RetryStrategy retryStrategy)
Initializes a new instance of the RetryPolicy class with the specified number of retry
attempts and parameters defining the progressive delay between retries.
Initializes a new instance of the RetryPolicy class with the specified number of retry
attempts and default fixed time interval between retries.
public RetryPolicy(ITransientErrorDetectionStrategy errorDetectionStrategy, int retryCount, TimeSpan retryInterval)
Initializes a new instance of the RetryPolicy class with the specified number of retry
attempts and fixed time interval between retries.
public RetryPolicy(ITransientErrorDetectionStrategy errorDetectionStrategy, int retryCount, TimeSpan minBackoff, TimeSpan maxBackoff, TimeSpan deltaBackoff)
Initializes a new instance of the RetryPolicy class with the specified number of retry attempts
and backoff parameters for calculating the exponential delay between retries.
public RetryPolicy(ITransientErrorDetectionStrategy errorDetectionStrategy, int retryCount, TimeSpan initialInterval, TimeSpan increment)
Initializes a new instance of the RetryPolicy class with the specified number of retry
attempts and parameters defining the progressive delay between retries.
Repetitively executes the specified action while it satisfies the current retry policy.
Repetitively executes the specified action while it satisfies the current retry policy.
Repetitively executes the specified asynchronous task while it satisfies the current retry policy.
Repetitively executes the specified asynchronous task while it satisfies the current retry policy.
Repeatedly executes the specified asynchronous task while it satisfies the current retry policy.
public Task<TResult> ExecuteAsync<TResult>(Func<Task<TResult>> taskFunc, CancellationToken cancellationToken)
Repeatedly executes the specified asynchronous task while it satisfies the current retry policy.
Notifies the subscribers whenever a retry condition is encountered.