Table of Contents

Class RetryResiliencePipelineBuilderExtensions

Namespace
Polly
Assembly
Polly.Core.dll

Extensions for adding retries to ResiliencePipelineBuilder.

public static class RetryResiliencePipelineBuilderExtensions
Inheritance
RetryResiliencePipelineBuilderExtensions
Inherited Members

Methods

AddRetry(ResiliencePipelineBuilder, RetryStrategyOptions)

Adds a retry to the builder.

public static ResiliencePipelineBuilder AddRetry(this ResiliencePipelineBuilder builder, RetryStrategyOptions options)

Parameters

builder ResiliencePipelineBuilder

The builder instance.

options RetryStrategyOptions

The retry options.

Returns

ResiliencePipelineBuilder

The builder instance with the retry strategy added.

Exceptions

ArgumentNullException

Thrown when builder or options is null.

ValidationException

Thrown when options are invalid.

AddRetry<TResult>(ResiliencePipelineBuilder<TResult>, RetryStrategyOptions<TResult>)

Adds a retry to the builder.

public static ResiliencePipelineBuilder<TResult> AddRetry<TResult>(this ResiliencePipelineBuilder<TResult> builder, RetryStrategyOptions<TResult> options)

Parameters

builder ResiliencePipelineBuilder<TResult>

The builder instance.

options RetryStrategyOptions<TResult>

The retry options.

Returns

ResiliencePipelineBuilder<TResult>

The builder instance with the retry added.

Type Parameters

TResult

The type of result the retry handles.

Exceptions

ArgumentNullException

Thrown when builder or options is null.

ValidationException

Thrown when options are invalid.