Table of Contents

Class TimeoutResiliencePipelineBuilderExtensions

Namespace
Polly
Assembly
Polly.Core.dll

Extensions for adding timeout to ResiliencePipelineBuilder.

public static class TimeoutResiliencePipelineBuilderExtensions
Inheritance
TimeoutResiliencePipelineBuilderExtensions
Inherited Members

Methods

AddTimeout<TBuilder>(TBuilder, TimeoutStrategyOptions)

Adds a timeout to the builder.

public static TBuilder AddTimeout<TBuilder>(this TBuilder builder, TimeoutStrategyOptions options) where TBuilder : ResiliencePipelineBuilderBase

Parameters

builder TBuilder

The builder instance.

options TimeoutStrategyOptions

The timeout options.

Returns

TBuilder

The same builder instance.

Type Parameters

TBuilder

The builder type.

Exceptions

ArgumentNullException

Thrown when builder or options is null.

ValidationException

Thrown when options are invalid.

AddTimeout<TBuilder>(TBuilder, TimeSpan)

Adds a timeout to the builder.

public static TBuilder AddTimeout<TBuilder>(this TBuilder builder, TimeSpan timeout) where TBuilder : ResiliencePipelineBuilderBase

Parameters

builder TBuilder

The builder instance.

timeout TimeSpan

The timeout value. This value should be greater than Zero.

Returns

TBuilder

The same builder instance.

Type Parameters

TBuilder

The builder type.

Exceptions

ArgumentNullException

Thrown when builder is null.

ValidationException

Thrown when the options produced from the arguments are invalid.