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

OnRetryArguments<TResult>

public struct OnRetryArguments<TResult> : IOutcomeArguments<TResult>
Represents the arguments used by OnRetry for handling the retry event.
public int AttemptNumber { get; }

Gets the zero-based attempt number.

public ResilienceContext Context { get; }

Gets the context of this event.

public TimeSpan Duration { get; }

Gets the duration of this attempt.

public Outcome<TResult> Outcome { get; }

Gets the outcome that will be retried.

public TimeSpan RetryDelay { get; }

Gets the delay before the next retry.

public OnRetryArguments(ResilienceContext context, Outcome<TResult> outcome, int attemptNumber, TimeSpan retryDelay, TimeSpan duration)

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