Class RetryOptions
Defines retry policies that can be passed as parameters to various operations.
public class RetryOptions
- Inheritance
-
RetryOptions
- Inherited Members
Constructors
RetryOptions(TimeSpan, int)
Creates a new instance RetryOptions with the supplied first retry and max attempts.
public RetryOptions(TimeSpan firstRetryInterval, int maxNumberOfAttempts)
Parameters
firstRetryIntervalTimeSpanTimespan to wait for the first retry.
maxNumberOfAttemptsintMax number of attempts to retry.
Exceptions
- ArgumentException
The
firstRetryIntervalvalue must be greater than Zero.
Properties
BackoffCoefficient
Gets or sets the backoff coefficient.
public double BackoffCoefficient { get; set; }
Property Value
- double
The backoff coefficient used to determine rate of increase of backoff. Defaults to 1.
FirstRetryInterval
Gets or sets the first retry interval.
public TimeSpan FirstRetryInterval { get; set; }
Property Value
- TimeSpan
The TimeSpan to wait for the first retries.
Handle
Gets or sets a delegate to call on exception to determine if retries should proceed.
public Func<Exception, bool> Handle { get; set; }
Property Value
MaxNumberOfAttempts
Gets or sets the max number of attempts.
public int MaxNumberOfAttempts { get; set; }
Property Value
- int
The maximum number of retry attempts.
MaxRetryInterval
Gets or sets the max retry interval.
public TimeSpan MaxRetryInterval { get; set; }
Property Value
RetryTimeout
Gets or sets the timeout for retries.
public TimeSpan RetryTimeout { get; set; }