Class ChaosOutcomePipelineBuilderExtensions
Extension methods for adding chaos outcome strategy to a ResiliencePipelineBuilder.
public static class ChaosOutcomePipelineBuilderExtensions
- Inheritance
-
ChaosOutcomePipelineBuilderExtensions
- Inherited Members
Methods
AddChaosOutcome<TResult>(ResiliencePipelineBuilder<TResult>, ChaosOutcomeStrategyOptions<TResult>)
Adds an outcome chaos strategy to the builder.
public static ResiliencePipelineBuilder<TResult> AddChaosOutcome<TResult>(this ResiliencePipelineBuilder<TResult> builder, ChaosOutcomeStrategyOptions<TResult> options)
Parameters
builder
ResiliencePipelineBuilder<TResult>The builder instance.
options
ChaosOutcomeStrategyOptions<TResult>The strategy options.
Returns
- ResiliencePipelineBuilder<TResult>
The same builder instance.
Type Parameters
TResult
The type of result the strategy handles.
AddChaosOutcome<TResult>(ResiliencePipelineBuilder<TResult>, double, Func<TResult?>)
Adds an outcome chaos strategy to the builder.
public static ResiliencePipelineBuilder<TResult> AddChaosOutcome<TResult>(this ResiliencePipelineBuilder<TResult> builder, double injectionRate, Func<TResult?> resultGenerator)
Parameters
builder
ResiliencePipelineBuilder<TResult>The builder instance.
injectionRate
doubleThe injection rate for a given execution, which the value should be between [0, 1] (inclusive).
resultGenerator
Func<TResult>The outcome generator delegate.
Returns
- ResiliencePipelineBuilder<TResult>
The same builder instance.
Type Parameters
TResult
The type of result the strategy handles.