<PackageReference Include="Polly.Core" Version="8.3.0" />

HedgingStrategyOptions<TResult>

Hedging strategy options.
public Func<HedgingActionGeneratorArguments<TResult>, Func<ValueTask<Outcome<TResult>>>> ActionGenerator { get; set; }

Gets or sets a generator that creates hedged actions.

public TimeSpan Delay { get; set; }

Gets or sets the maximum waiting time before spawning a new hedged action.

Gets or sets a generator that generates hedging delays for each hedging action.

public int MaxHedgedAttempts { get; set; }

Gets or sets the maximum number of hedged actions to use, in addition to the original action.

public Func<OnHedgingArguments<TResult>, ValueTask> OnHedging { get; set; }

Gets or sets the event that is raised when a hedging is performed.

public Func<HedgingPredicateArguments<TResult>, ValueTask<bool>> ShouldHandle { get; set; }

Gets or sets a predicate that determines whether the hedging should be executed for a given outcome.

Initializes a new instance of the HedgingStrategyOptions<T> class.