<PackageReference Include="Polly.Core" Version="8.0.0-alpha.8" />

HedgingActionGeneratorArguments<TResult>

public struct HedgingActionGeneratorArguments<TResult>
Represents arguments used in the hedging resilience strategy.

Gets the context that will be passed to action generated by HedgingActionGenerator.

public int AttemptNumber { get; }

Gets the zero-based hedging attempt number.

public Func<ResilienceContext, ValueTask<Outcome<TResult>>> Callback { get; }

Gets the callback passed to hedging strategy.

Gets the primary resilience context.

public HedgingActionGeneratorArguments(ResilienceContext primaryContext, ResilienceContext actionContext, int attemptNumber, Func<ResilienceContext, ValueTask<Outcome<TResult>>> callback)

Initializes a new instance of the HedgingActionGeneratorArguments<T> struct.