Table of Contents

Class ChaosFaultPipelineBuilderExtensions

Namespace
Polly.Simmy
Assembly
Polly.Core.dll

Extension methods for adding chaos fault strategy to a ResiliencePipelineBuilder.

public static class ChaosFaultPipelineBuilderExtensions
Inheritance
ChaosFaultPipelineBuilderExtensions
Inherited Members

Methods

AddChaosFault<TBuilder>(TBuilder, ChaosFaultStrategyOptions)

Adds a fault chaos strategy to the builder.

public static TBuilder AddChaosFault<TBuilder>(this TBuilder builder, ChaosFaultStrategyOptions options) where TBuilder : ResiliencePipelineBuilderBase

Parameters

builder TBuilder

The builder instance.

options ChaosFaultStrategyOptions

The fault strategy options.

Returns

TBuilder

The same builder instance.

Type Parameters

TBuilder

The builder type.

AddChaosFault<TBuilder>(TBuilder, double, Func<Exception?>)

Adds a fault chaos strategy to the builder.

public static TBuilder AddChaosFault<TBuilder>(this TBuilder builder, double injectionRate, Func<Exception?> faultGenerator) where TBuilder : ResiliencePipelineBuilderBase

Parameters

builder TBuilder

The builder instance.

injectionRate double

The injection rate for a given execution, which the value should be between [0, 1] (inclusive).

faultGenerator Func<Exception>

The exception generator delegate.

Returns

TBuilder

The same builder instance.

Type Parameters

TBuilder

The builder type.