Condividi tramite


DelayStrategy Class

Definition

Strategy to control delay behavior.

public abstract class DelayStrategy
type DelayStrategy = class
Public MustInherit Class DelayStrategy
Inheritance
DelayStrategy

Constructors

DelayStrategy(Nullable<TimeSpan>, Double)

Constructs a new instance of DelayStrategy. This constructor can be used by derived classes to customize the jitter factor and max delay.

Methods

CreateExponentialDelayStrategy(Nullable<TimeSpan>, Nullable<TimeSpan>)

Constructs an exponential delay with jitter.

CreateFixedDelayStrategy(Nullable<TimeSpan>)

Constructs a fixed delay with jitter.

GetNextDelay(Response, Int32)

Gets the next delay interval taking into account the Max Delay, jitter, and any Retry-After headers.

GetNextDelayCore(Response, Int32)

Gets the next delay interval. Implement this method to provide custom delay logic. The Max Delay, jitter, and any Retry-After headers will be applied to the value returned from this method.

Max(TimeSpan, TimeSpan)

Gets the maximum of two TimeSpan values.

Min(TimeSpan, TimeSpan)

Gets the minimum of two TimeSpan values.

Applies to