Aracılığıyla paylaş


ClientRetryPolicy.WaitAsync(TimeSpan, CancellationToken) Method

Definition

A method that can be overridden by derived types to customize the default ClientRetryPolicy logic. It is called from Process(PipelineMessage, IReadOnlyList<PipelinePolicy>, Int32) to wait the time interval returned by GetNextDelay(PipelineMessage, Int32).

protected virtual System.Threading.Tasks.Task WaitAsync (TimeSpan time, System.Threading.CancellationToken cancellationToken);
abstract member WaitAsync : TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.WaitAsync : TimeSpan * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Protected Overridable Function WaitAsync (time As TimeSpan, cancellationToken As CancellationToken) As Task

Parameters

time
TimeSpan

The amount of time to wait before trying to send the request again.

cancellationToken
CancellationToken

The CancellationToken used to cancel the wait if needed.

Returns

A task that can be awaited to asynchronously delay before the next retry attempt.

Applies to