你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

RetryPolicy.OnShouldRetry(TimeSpan, Int32, TimeSpan) 方法

定义

计算重试策略的重试间隔。

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

参数

remainingTime
TimeSpan

剩余时间。

currentRetryCount
Int32

重试总数。

retryInterval
TimeSpan

重试间隔。

返回

如果此方法返回 true,则重试操作在线程空闲的时间量等于 retryInterval后发生。

适用于