Compartir a través de


RetryPolicy.OnShouldRetry(TimeSpan, Int32, TimeSpan) Método

Definición

Calcula el intervalo de reintento de la directiva de reintento.

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

Parámetros

remainingTime
TimeSpan

Tiempo restante.

currentRetryCount
Int32

Número total de reintentos.

retryInterval
TimeSpan

Intervalo de reintento.

Devoluciones

Si este método devuelve true, la operación de reintento se produce después de que el subproceso esté inactivo durante una cantidad de tiempo igual a retryInterval.

Se aplica a