Table of Contents

Class ChaosLatencyPipelineBuilderExtensions

Namespace
Polly.Simmy
Assembly
Polly.Core.dll

Extension methods for adding chaos latency strategies to a ResiliencePipelineBuilderBase.

public static class ChaosLatencyPipelineBuilderExtensions
Inheritance
ChaosLatencyPipelineBuilderExtensions
Inherited Members

Methods

AddChaosLatency<TBuilder>(TBuilder, ChaosLatencyStrategyOptions)

Adds a latency chaos strategy to the builder.

public static TBuilder AddChaosLatency<TBuilder>(this TBuilder builder, ChaosLatencyStrategyOptions options) where TBuilder : ResiliencePipelineBuilderBase

Parameters

builder TBuilder

The builder instance.

options ChaosLatencyStrategyOptions

The latency 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.

AddChaosLatency<TBuilder>(TBuilder, double, TimeSpan)

Adds a latency chaos strategy to the builder.

public static TBuilder AddChaosLatency<TBuilder>(this TBuilder builder, double injectionRate, TimeSpan latency) 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).

latency TimeSpan

The delay value.

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.