Class FallbackResiliencePipelineBuilderExtensions
- Namespace
- Polly
- Assembly
- Polly.Core.dll
Extensions for adding fallback to ResiliencePipelineBuilder.
public static class FallbackResiliencePipelineBuilderExtensions
- Inheritance
-
FallbackResiliencePipelineBuilderExtensions
- Inherited Members
Methods
AddFallback<TResult>(ResiliencePipelineBuilder<TResult>, FallbackStrategyOptions<TResult>)
Adds a fallback resilience strategy with the provided options to the builder.
public static ResiliencePipelineBuilder<TResult> AddFallback<TResult>(this ResiliencePipelineBuilder<TResult> builder, FallbackStrategyOptions<TResult> options)
Parameters
builder
ResiliencePipelineBuilder<TResult>The resilience pipeline builder.
options
FallbackStrategyOptions<TResult>The options to configure the fallback resilience strategy.
Returns
- ResiliencePipelineBuilder<TResult>
The builder instance with the fallback strategy added.
Type Parameters
TResult
The result type.
Exceptions
- ArgumentNullException
Thrown when
builder
oroptions
is null.- ValidationException
Thrown when
options
are invalid.