Freigeben über


ClientRetryPolicy.ShouldRetryAsync(PipelineMessage, Exception) 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) after control has been returned from the policy at the position after the retry policy in the pipeline.

protected virtual System.Threading.Tasks.ValueTask<bool> ShouldRetryAsync (System.ClientModel.Primitives.PipelineMessage message, Exception? exception);
abstract member ShouldRetryAsync : System.ClientModel.Primitives.PipelineMessage * Exception -> System.Threading.Tasks.ValueTask<bool>
override this.ShouldRetryAsync : System.ClientModel.Primitives.PipelineMessage * Exception -> System.Threading.Tasks.ValueTask<bool>
Protected Overridable Function ShouldRetryAsync (message As PipelineMessage, exception As Exception) As ValueTask(Of Boolean)

Parameters

message
PipelineMessage

The PipelineMessage for this pipeline invocation.

exception
Exception

The exception, if any, that was thrown from a policy after the retry policy in the pipeline.

Returns

Applies to