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

OnHedgingArguments<TResult>

public struct OnHedgingArguments<TResult>
Represents arguments used by the on-hedging event.
public int AttemptNumber { get; }

Gets the zero-based hedging attempt number.

public ResilienceContext Context { get; }

Gets the context of this event.

public TimeSpan Duration { get; }

Gets the execution duration of hedging attempt or the hedging delay in case the attempt was not finished in time.

public Outcome<TResult>? Outcome { get; }

Gets the outcome that needs to be hedged, if any.

public OnHedgingArguments(ResilienceContext context, Outcome<TResult>? outcome, int attemptNumber, TimeSpan duration)

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