C# Class Polly.RetrySyntaxAsync

Fluent API for defining a Retry Policy.
Show file Open project: App-vNext/Polly

Public Methods

Method Description
RetryAsync ( this policyBuilder ) : RetryPolicy

Builds a Policy that will retry once.

RetryAsync ( this policyBuilder, Action onRetry ) : RetryPolicy

Builds a Policy that will retry once calling onRetry on retry with the raised exception, retry count and context data.

RetryAsync ( this policyBuilder, int>.Action onRetry ) : RetryPolicy

Builds a Policy that will retry once calling onRetry on retry with the raised exception and retry count.

RetryAsync ( this policyBuilder, Func onRetryAsync ) : RetryPolicy

Builds a Policy that will retry once calling onRetryAsync on retry with the raised exception, retry count and context data.

RetryAsync ( this policyBuilder, Func onRetryAsync ) : RetryPolicy

Builds a Policy that will retry once calling onRetryAsync on retry with the raised exception and retry count.

RetryAsync ( this policyBuilder, int retryCount ) : RetryPolicy

Builds a Policy that will retry retryCount times.

RetryAsync ( this policyBuilder, int retryCount, Action onRetry ) : RetryPolicy

Builds a Policy that will retry retryCount times calling onRetry on each retry with the raised exception, retry count and context data.

RetryAsync ( this policyBuilder, int retryCount, int>.Action onRetry ) : RetryPolicy

Builds a Policy that will retry retryCount times calling onRetry on each retry with the raised exception and retry count.

RetryAsync ( this policyBuilder, int retryCount, Func onRetryAsync ) : RetryPolicy

Builds a Policy that will retry retryCount times calling onRetryAsync on each retry with the raised exception, retry count and context data.

RetryAsync ( this policyBuilder, int retryCount, Func onRetryAsync ) : RetryPolicy

Builds a Policy that will retry retryCount times calling onRetryAsync on each retry with the raised exception and retry count.

RetryForeverAsync ( this policyBuilder ) : RetryPolicy

Builds a Policy that will retry indefinitely.

RetryForeverAsync ( this policyBuilder, Context>.Action onRetry ) : RetryPolicy

Builds a Policy that will retry indefinitely calling onRetry on each retry with the raised exception and context data.

RetryForeverAsync ( this policyBuilder, Action onRetry ) : RetryPolicy

Builds a Policy that will retry indefinitely calling onRetry on each retry with the raised exception.

RetryForeverAsync ( this policyBuilder, Func onRetryAsync ) : RetryPolicy

Builds a Policy that will retry indefinitely calling onRetryAsync on each retry with the raised exception and context data.

RetryForeverAsync ( this policyBuilder, Task>.Func onRetryAsync ) : RetryPolicy

Builds a Policy that will retry indefinitely calling onRetryAsync on each retry with the raised exception.

WaitAndRetryAsync ( this policyBuilder, IEnumerable sleepDurations ) : RetryPolicy

Builds a Policy that will wait and retry as many times as there are provided sleepDurations On each retry, the duration to wait is the current sleepDurations item.

WaitAndRetryAsync ( this policyBuilder, IEnumerable sleepDurations, Action onRetry ) : RetryPolicy

Builds a Policy that will wait and retry as many times as there are provided sleepDurations calling onRetry on each retry with the raised exception, the current sleep duration and context data. On each retry, the duration to wait is the current sleepDurations item.

WaitAndRetryAsync ( this policyBuilder, IEnumerable sleepDurations, Action onRetry ) : RetryPolicy

Builds a Policy that will wait and retry as many times as there are provided sleepDurations calling onRetry on each retry with the raised exception, the current sleep duration, retry count, and context data. On each retry, the duration to wait is the current sleepDurations item.

WaitAndRetryAsync ( this policyBuilder, IEnumerable sleepDurations, TimeSpan>.Action onRetry ) : RetryPolicy

Builds a Policy that will wait and retry as many times as there are provided sleepDurations calling onRetry on each retry with the raised exception and the current sleep duration. On each retry, the duration to wait is the current sleepDurations item.

WaitAndRetryAsync ( this policyBuilder, IEnumerable sleepDurations, Func onRetryAsync ) : RetryPolicy

Builds a Policy that will wait and retry as many times as there are provided sleepDurations calling onRetryAsync on each retry with the raised exception, the current sleep duration and context data. On each retry, the duration to wait is the current sleepDurations item.

WaitAndRetryAsync ( this policyBuilder, IEnumerable sleepDurations, Func onRetryAsync ) : RetryPolicy

Builds a Policy that will wait and retry as many times as there are provided sleepDurations calling onRetryAsync on each retry with the raised exception and the current sleep duration. On each retry, the duration to wait is the current sleepDurations item.

WaitAndRetryAsync ( this policyBuilder, IEnumerable sleepDurations, Func onRetryAsync ) : RetryPolicy

Builds a Policy that will wait and retry as many times as there are provided sleepDurations calling onRetryAsync on each retry with the raised exception, the current sleep duration, retry count, and context data. On each retry, the duration to wait is the current sleepDurations item.

WaitAndRetryAsync ( this policyBuilder, int retryCount, TimeSpan>.Func sleepDurationProvider ) : RetryPolicy

Builds a Policy that will wait and retry retryCount times. On each retry, the duration to wait is calculated by calling sleepDurationProvider with the current retry attempt allowing an exponentially increasing wait time (exponential backoff).

WaitAndRetryAsync ( this policyBuilder, int retryCount, TimeSpan>.Func sleepDurationProvider, Action onRetry ) : RetryPolicy

Builds a Policy that will wait and retry retryCount times calling onRetry on each retry with the raised exception, the current sleep duration and context data. On each retry, the duration to wait is calculated by calling sleepDurationProvider with the current retry attempt allowing an exponentially increasing wait time (exponential backoff).

WaitAndRetryAsync ( this policyBuilder, int retryCount, TimeSpan>.Func sleepDurationProvider, Action onRetry ) : RetryPolicy

Builds a Policy that will wait and retry retryCount times calling onRetry on each retry with the raised exception, the current sleep duration, retry count, and context data. On each retry, the duration to wait is calculated by calling sleepDurationProvider with the current retry attempt allowing an exponentially increasing wait time (exponential backoff).

WaitAndRetryAsync ( this policyBuilder, int retryCount, TimeSpan>.Func sleepDurationProvider, TimeSpan>.Action onRetry ) : RetryPolicy

Builds a Policy that will wait and retry retryCount times calling onRetry on each retry with the raised exception and the current sleep duration. On each retry, the duration to wait is calculated by calling sleepDurationProvider with the current retry attempt allowing an exponentially increasing wait time (exponential backoff).

WaitAndRetryAsync ( this policyBuilder, int retryCount, TimeSpan>.Func sleepDurationProvider, Func onRetryAsync ) : RetryPolicy

Builds a Policy that will wait and retry retryCount times calling onRetryAsync on each retry with the raised exception, the current sleep duration and context data. On each retry, the duration to wait is calculated by calling sleepDurationProvider with the current retry attempt allowing an exponentially increasing wait time (exponential backoff).

WaitAndRetryAsync ( this policyBuilder, int retryCount, TimeSpan>.Func sleepDurationProvider, Func onRetryAsync ) : RetryPolicy

Builds a Policy that will wait and retry retryCount times calling onRetryAsync on each retry with the raised exception and the current sleep duration. On each retry, the duration to wait is calculated by calling sleepDurationProvider with the current retry attempt allowing an exponentially increasing wait time (exponential backoff).

WaitAndRetryAsync ( this policyBuilder, int retryCount, TimeSpan>.Func sleepDurationProvider, Func onRetryAsync ) : RetryPolicy

Builds a Policy that will wait and retry retryCount times calling onRetryAsync on each retry with the raised exception, the current sleep duration, retry count, and context data. On each retry, the duration to wait is calculated by calling sleepDurationProvider with the current retry attempt allowing an exponentially increasing wait time (exponential backoff).

WaitAndRetryForeverAsync ( this policyBuilder, TimeSpan>.Func sleepDurationProvider ) : RetryPolicy

Builds a Policy that will wait and retry indefinitely.

WaitAndRetryForeverAsync ( this policyBuilder, TimeSpan>.Func sleepDurationProvider, Action onRetry ) : RetryPolicy

Builds a Policy that will wait and retry indefinitely calling onRetry on each retry with the raised exception and execution context.

WaitAndRetryForeverAsync ( this policyBuilder, TimeSpan>.Func sleepDurationProvider, TimeSpan>.Action onRetry ) : RetryPolicy

Builds a Policy that will wait and retry indefinitely calling onRetry on each retry with the raised exception.

WaitAndRetryForeverAsync ( this policyBuilder, TimeSpan>.Func sleepDurationProvider, Func onRetryAsync ) : RetryPolicy

Builds a Policy that will wait and retry indefinitely calling onRetryAsync on each retry with the raised exception and execution context.

WaitAndRetryForeverAsync ( this policyBuilder, TimeSpan>.Func sleepDurationProvider, Func onRetryAsync ) : RetryPolicy

Builds a Policy that will wait and retry indefinitely calling onRetryAsync on each retry with the raised exception.

Method Details

RetryAsync() public static method

Builds a Policy that will retry once.
public static RetryAsync ( this policyBuilder ) : RetryPolicy
policyBuilder this The policy builder.
return Polly.Retry.RetryPolicy

RetryAsync() public static method

Builds a Policy that will retry once calling onRetry on retry with the raised exception, retry count and context data.
onRetry
public static RetryAsync ( this policyBuilder, Action onRetry ) : RetryPolicy
policyBuilder this The policy builder.
onRetry Action The action to call on each retry.
return Polly.Retry.RetryPolicy

RetryAsync() public static method

Builds a Policy that will retry once calling onRetry on retry with the raised exception and retry count.
onRetry
public static RetryAsync ( this policyBuilder, int>.Action onRetry ) : RetryPolicy
policyBuilder this The policy builder.
onRetry int>.Action The action to call on each retry.
return Polly.Retry.RetryPolicy

RetryAsync() public static method

Builds a Policy that will retry once calling onRetryAsync on retry with the raised exception, retry count and context data.
onRetry
public static RetryAsync ( this policyBuilder, Func onRetryAsync ) : RetryPolicy
policyBuilder this The policy builder.
onRetryAsync Func The action to call asynchronously on each retry.
return Polly.Retry.RetryPolicy

RetryAsync() public static method

Builds a Policy that will retry once calling onRetryAsync on retry with the raised exception and retry count.
onRetry
public static RetryAsync ( this policyBuilder, Func onRetryAsync ) : RetryPolicy
policyBuilder this The policy builder.
onRetryAsync Func The action to call asynchronously on each retry.
return Polly.Retry.RetryPolicy

RetryAsync() public static method

Builds a Policy that will retry retryCount times.
public static RetryAsync ( this policyBuilder, int retryCount ) : RetryPolicy
policyBuilder this The policy builder.
retryCount int The retry count.
return Polly.Retry.RetryPolicy

RetryAsync() public static method

Builds a Policy that will retry retryCount times calling onRetry on each retry with the raised exception, retry count and context data.
retryCount;Value must be greater than zero. onRetry
public static RetryAsync ( this policyBuilder, int retryCount, Action onRetry ) : RetryPolicy
policyBuilder this The policy builder.
retryCount int The retry count.
onRetry Action The action to call on each retry.
return Polly.Retry.RetryPolicy

RetryAsync() public static method

Builds a Policy that will retry retryCount times calling onRetry on each retry with the raised exception and retry count.
retryCount;Value must be greater than or equal to zero. onRetry
public static RetryAsync ( this policyBuilder, int retryCount, int>.Action onRetry ) : RetryPolicy
policyBuilder this The policy builder.
retryCount int The retry count.
onRetry int>.Action The action to call on each retry.
return Polly.Retry.RetryPolicy

RetryAsync() public static method

Builds a Policy that will retry retryCount times calling onRetryAsync on each retry with the raised exception, retry count and context data.
retryCount;Value must be greater than zero. onRetryAsync
public static RetryAsync ( this policyBuilder, int retryCount, Func onRetryAsync ) : RetryPolicy
policyBuilder this The policy builder.
retryCount int The retry count.
onRetryAsync Func The action to call asynchronously on each retry.
return Polly.Retry.RetryPolicy

RetryAsync() public static method

Builds a Policy that will retry retryCount times calling onRetryAsync on each retry with the raised exception and retry count.
retryCount;Value must be greater than or equal to zero. onRetryAsync
public static RetryAsync ( this policyBuilder, int retryCount, Func onRetryAsync ) : RetryPolicy
policyBuilder this The policy builder.
retryCount int The retry count.
onRetryAsync Func The action to call asynchronously on each retry.
return Polly.Retry.RetryPolicy

RetryForeverAsync() public static method

Builds a Policy that will retry indefinitely.
public static RetryForeverAsync ( this policyBuilder ) : RetryPolicy
policyBuilder this The policy builder.
return Polly.Retry.RetryPolicy

RetryForeverAsync() public static method

Builds a Policy that will retry indefinitely calling onRetry on each retry with the raised exception and context data.
onRetry
public static RetryForeverAsync ( this policyBuilder, Context>.Action onRetry ) : RetryPolicy
policyBuilder this The policy builder.
onRetry Context>.Action The action to call on each retry.
return Polly.Retry.RetryPolicy

RetryForeverAsync() public static method

Builds a Policy that will retry indefinitely calling onRetry on each retry with the raised exception.
onRetry
public static RetryForeverAsync ( this policyBuilder, Action onRetry ) : RetryPolicy
policyBuilder this The policy builder.
onRetry Action The action to call on each retry.
return Polly.Retry.RetryPolicy

RetryForeverAsync() public static method

Builds a Policy that will retry indefinitely calling onRetryAsync on each retry with the raised exception and context data.
onRetryAsync
public static RetryForeverAsync ( this policyBuilder, Func onRetryAsync ) : RetryPolicy
policyBuilder this The policy builder.
onRetryAsync Func The action to call asynchronously on each retry.
return Polly.Retry.RetryPolicy

RetryForeverAsync() public static method

Builds a Policy that will retry indefinitely calling onRetryAsync on each retry with the raised exception.
onRetryAsync
public static RetryForeverAsync ( this policyBuilder, Task>.Func onRetryAsync ) : RetryPolicy
policyBuilder this The policy builder.
onRetryAsync Task>.Func The action to call asynchronously on each retry.
return Polly.Retry.RetryPolicy

WaitAndRetryAsync() public static method

Builds a Policy that will wait and retry as many times as there are provided sleepDurations On each retry, the duration to wait is the current sleepDurations item.
public static WaitAndRetryAsync ( this policyBuilder, IEnumerable sleepDurations ) : RetryPolicy
policyBuilder this The policy builder.
sleepDurations IEnumerable The sleep durations to wait for on each retry.
return Polly.Retry.RetryPolicy

WaitAndRetryAsync() public static method

Builds a Policy that will wait and retry as many times as there are provided sleepDurations calling onRetry on each retry with the raised exception, the current sleep duration and context data. On each retry, the duration to wait is the current sleepDurations item.
/// sleepDurations /// or /// onRetry ///
public static WaitAndRetryAsync ( this policyBuilder, IEnumerable sleepDurations, Action onRetry ) : RetryPolicy
policyBuilder this The policy builder.
sleepDurations IEnumerable The sleep durations to wait for on each retry.
onRetry Action The action to call on each retry.
return Polly.Retry.RetryPolicy

WaitAndRetryAsync() public static method

Builds a Policy that will wait and retry as many times as there are provided sleepDurations calling onRetry on each retry with the raised exception, the current sleep duration, retry count, and context data. On each retry, the duration to wait is the current sleepDurations item.
/// sleepDurations /// or /// onRetry ///
public static WaitAndRetryAsync ( this policyBuilder, IEnumerable sleepDurations, Action onRetry ) : RetryPolicy
policyBuilder this The policy builder.
sleepDurations IEnumerable The sleep durations to wait for on each retry.
onRetry Action The action to call on each retry.
return Polly.Retry.RetryPolicy

WaitAndRetryAsync() public static method

Builds a Policy that will wait and retry as many times as there are provided sleepDurations calling onRetry on each retry with the raised exception and the current sleep duration. On each retry, the duration to wait is the current sleepDurations item.
/// sleepDurations /// or /// onRetry ///
public static WaitAndRetryAsync ( this policyBuilder, IEnumerable sleepDurations, TimeSpan>.Action onRetry ) : RetryPolicy
policyBuilder this The policy builder.
sleepDurations IEnumerable The sleep durations to wait for on each retry.
onRetry TimeSpan>.Action The action to call on each retry.
return Polly.Retry.RetryPolicy

WaitAndRetryAsync() public static method

Builds a Policy that will wait and retry as many times as there are provided sleepDurations calling onRetryAsync on each retry with the raised exception, the current sleep duration and context data. On each retry, the duration to wait is the current sleepDurations item.
/// sleepDurations /// or /// onRetryAsync ///
public static WaitAndRetryAsync ( this policyBuilder, IEnumerable sleepDurations, Func onRetryAsync ) : RetryPolicy
policyBuilder this The policy builder.
sleepDurations IEnumerable The sleep durations to wait for on each retry.
onRetryAsync Func The action to call asynchronously on each retry.
return Polly.Retry.RetryPolicy

WaitAndRetryAsync() public static method

Builds a Policy that will wait and retry as many times as there are provided sleepDurations calling onRetryAsync on each retry with the raised exception and the current sleep duration. On each retry, the duration to wait is the current sleepDurations item.
/// sleepDurations /// or /// onRetryAsync ///
public static WaitAndRetryAsync ( this policyBuilder, IEnumerable sleepDurations, Func onRetryAsync ) : RetryPolicy
policyBuilder this The policy builder.
sleepDurations IEnumerable The sleep durations to wait for on each retry.
onRetryAsync Func The action to call asynchronously on each retry.
return Polly.Retry.RetryPolicy

WaitAndRetryAsync() public static method

Builds a Policy that will wait and retry as many times as there are provided sleepDurations calling onRetryAsync on each retry with the raised exception, the current sleep duration, retry count, and context data. On each retry, the duration to wait is the current sleepDurations item.
/// sleepDurations /// or /// onRetryAsync ///
public static WaitAndRetryAsync ( this policyBuilder, IEnumerable sleepDurations, Func onRetryAsync ) : RetryPolicy
policyBuilder this The policy builder.
sleepDurations IEnumerable The sleep durations to wait for on each retry.
onRetryAsync Func The action to call asynchronously on each retry.
return Polly.Retry.RetryPolicy

WaitAndRetryAsync() public static method

Builds a Policy that will wait and retry retryCount times. On each retry, the duration to wait is calculated by calling sleepDurationProvider with the current retry attempt allowing an exponentially increasing wait time (exponential backoff).
public static WaitAndRetryAsync ( this policyBuilder, int retryCount, TimeSpan>.Func sleepDurationProvider ) : RetryPolicy
policyBuilder this The policy builder.
retryCount int The retry count.
sleepDurationProvider TimeSpan>.Func The function that provides the duration to wait for for a particular retry attempt.
return Polly.Retry.RetryPolicy

WaitAndRetryAsync() public static method

Builds a Policy that will wait and retry retryCount times calling onRetry on each retry with the raised exception, the current sleep duration and context data. On each retry, the duration to wait is calculated by calling sleepDurationProvider with the current retry attempt allowing an exponentially increasing wait time (exponential backoff).
retryCount;Value must be greater than or equal to zero. /// sleepDurationProvider /// or /// onRetry ///
public static WaitAndRetryAsync ( this policyBuilder, int retryCount, TimeSpan>.Func sleepDurationProvider, Action onRetry ) : RetryPolicy
policyBuilder this The policy builder.
retryCount int The retry count.
sleepDurationProvider TimeSpan>.Func The function that provides the duration to wait for for a particular retry attempt.
onRetry Action The action to call on each retry.
return Polly.Retry.RetryPolicy

WaitAndRetryAsync() public static method

Builds a Policy that will wait and retry retryCount times calling onRetry on each retry with the raised exception, the current sleep duration, retry count, and context data. On each retry, the duration to wait is calculated by calling sleepDurationProvider with the current retry attempt allowing an exponentially increasing wait time (exponential backoff).
retryCount;Value must be greater than or equal to zero. /// sleepDurationProvider /// or /// onRetry ///
public static WaitAndRetryAsync ( this policyBuilder, int retryCount, TimeSpan>.Func sleepDurationProvider, Action onRetry ) : RetryPolicy
policyBuilder this The policy builder.
retryCount int The retry count.
sleepDurationProvider TimeSpan>.Func The function that provides the duration to wait for for a particular retry attempt.
onRetry Action The action to call on each retry.
return Polly.Retry.RetryPolicy

WaitAndRetryAsync() public static method

Builds a Policy that will wait and retry retryCount times calling onRetry on each retry with the raised exception and the current sleep duration. On each retry, the duration to wait is calculated by calling sleepDurationProvider with the current retry attempt allowing an exponentially increasing wait time (exponential backoff).
retryCount;Value must be greater than or equal to zero. /// sleepDurationProvider /// or /// onRetry ///
public static WaitAndRetryAsync ( this policyBuilder, int retryCount, TimeSpan>.Func sleepDurationProvider, TimeSpan>.Action onRetry ) : RetryPolicy
policyBuilder this The policy builder.
retryCount int The retry count.
sleepDurationProvider TimeSpan>.Func The function that provides the duration to wait for for a particular retry attempt.
onRetry TimeSpan>.Action The action to call on each retry.
return Polly.Retry.RetryPolicy

WaitAndRetryAsync() public static method

Builds a Policy that will wait and retry retryCount times calling onRetryAsync on each retry with the raised exception, the current sleep duration and context data. On each retry, the duration to wait is calculated by calling sleepDurationProvider with the current retry attempt allowing an exponentially increasing wait time (exponential backoff).
retryCount;Value must be greater than or equal to zero. /// sleepDurationProvider /// or /// onRetryAsync ///
public static WaitAndRetryAsync ( this policyBuilder, int retryCount, TimeSpan>.Func sleepDurationProvider, Func onRetryAsync ) : RetryPolicy
policyBuilder this The policy builder.
retryCount int The retry count.
sleepDurationProvider TimeSpan>.Func The function that provides the duration to wait for for a particular retry attempt.
onRetryAsync Func The action to call asynchronously on each retry.
return Polly.Retry.RetryPolicy

WaitAndRetryAsync() public static method

Builds a Policy that will wait and retry retryCount times calling onRetryAsync on each retry with the raised exception and the current sleep duration. On each retry, the duration to wait is calculated by calling sleepDurationProvider with the current retry attempt allowing an exponentially increasing wait time (exponential backoff).
retryCount;Value must be greater than or equal to zero. /// sleepDurationProvider /// or /// onRetryAsync ///
public static WaitAndRetryAsync ( this policyBuilder, int retryCount, TimeSpan>.Func sleepDurationProvider, Func onRetryAsync ) : RetryPolicy
policyBuilder this The policy builder.
retryCount int The retry count.
sleepDurationProvider TimeSpan>.Func The function that provides the duration to wait for for a particular retry attempt.
onRetryAsync Func The action to call asynchronously on each retry.
return Polly.Retry.RetryPolicy

WaitAndRetryAsync() public static method

Builds a Policy that will wait and retry retryCount times calling onRetryAsync on each retry with the raised exception, the current sleep duration, retry count, and context data. On each retry, the duration to wait is calculated by calling sleepDurationProvider with the current retry attempt allowing an exponentially increasing wait time (exponential backoff).
retryCount;Value must be greater than or equal to zero. /// sleepDurationProvider /// or /// onRetryAsync ///
public static WaitAndRetryAsync ( this policyBuilder, int retryCount, TimeSpan>.Func sleepDurationProvider, Func onRetryAsync ) : RetryPolicy
policyBuilder this The policy builder.
retryCount int The retry count.
sleepDurationProvider TimeSpan>.Func The function that provides the duration to wait for for a particular retry attempt.
onRetryAsync Func The action to call asynchronously on each retry.
return Polly.Retry.RetryPolicy

WaitAndRetryForeverAsync() public static method

Builds a Policy that will wait and retry indefinitely.
sleepDurationProvider
public static WaitAndRetryForeverAsync ( this policyBuilder, TimeSpan>.Func sleepDurationProvider ) : RetryPolicy
policyBuilder this The policy builder.
sleepDurationProvider TimeSpan>.Func The function that provides the duration to wait for for a particular retry attempt.
return Polly.Retry.RetryPolicy

WaitAndRetryForeverAsync() public static method

Builds a Policy that will wait and retry indefinitely calling onRetry on each retry with the raised exception and execution context.
sleepDurationProvider onRetry
public static WaitAndRetryForeverAsync ( this policyBuilder, TimeSpan>.Func sleepDurationProvider, Action onRetry ) : RetryPolicy
policyBuilder this The policy builder.
sleepDurationProvider TimeSpan>.Func
onRetry Action The action to call on each retry.
return Polly.Retry.RetryPolicy

WaitAndRetryForeverAsync() public static method

Builds a Policy that will wait and retry indefinitely calling onRetry on each retry with the raised exception.
sleepDurationProvider onRetry
public static WaitAndRetryForeverAsync ( this policyBuilder, TimeSpan>.Func sleepDurationProvider, TimeSpan>.Action onRetry ) : RetryPolicy
policyBuilder this The policy builder.
sleepDurationProvider TimeSpan>.Func
onRetry TimeSpan>.Action The action to call on each retry.
return Polly.Retry.RetryPolicy

WaitAndRetryForeverAsync() public static method

Builds a Policy that will wait and retry indefinitely calling onRetryAsync on each retry with the raised exception and execution context.
sleepDurationProvider onRetryAsync
public static WaitAndRetryForeverAsync ( this policyBuilder, TimeSpan>.Func sleepDurationProvider, Func onRetryAsync ) : RetryPolicy
policyBuilder this The policy builder.
sleepDurationProvider TimeSpan>.Func
onRetryAsync Func The action to call asynchronously on each retry.
return Polly.Retry.RetryPolicy

WaitAndRetryForeverAsync() public static method

Builds a Policy that will wait and retry indefinitely calling onRetryAsync on each retry with the raised exception.
sleepDurationProvider onRetryAsync
public static WaitAndRetryForeverAsync ( this policyBuilder, TimeSpan>.Func sleepDurationProvider, Func onRetryAsync ) : RetryPolicy
policyBuilder this The policy builder.
sleepDurationProvider TimeSpan>.Func
onRetryAsync Func The action to call asynchronously on each retry.
return Polly.Retry.RetryPolicy