RetryPolicy.OnShouldRetry(TimeSpan, Int32, TimeSpan) Method

Definition

Calculates the retry interval for the retry policy.

protected abstract bool OnShouldRetry (TimeSpan remainingTime, int currentRetryCount, out TimeSpan retryInterval);
abstract member OnShouldRetry : TimeSpan * int *  -> bool
Protected MustOverride Function OnShouldRetry (remainingTime As TimeSpan, currentRetryCount As Integer, ByRef retryInterval As TimeSpan) As Boolean

Parameters

remainingTime
System.TimeSpan

The remaining time.

currentRetryCount
System.Int32

The total number of retries.

retryInterval
System.TimeSpan

The retry interval.

Returns

System.Boolean

If this method returns true, the retry operation occurs after the thread becomes idle for an amount of time equal to retryInterval.

Applies to