Struct OnRetryArguments<TResult>
Represents the arguments used by OnRetry for handling the retry event.
public readonly struct OnRetryArguments<TResult>
  Type Parameters
TResultThe type of result.
- Inherited Members
 
Remarks
Always use the constructor when creating this struct, otherwise we do not guarantee binary compatibility.
Constructors
OnRetryArguments(ResilienceContext, Outcome<TResult>, int, TimeSpan, TimeSpan)
Initializes a new instance of the OnRetryArguments<TResult> struct.
public OnRetryArguments(ResilienceContext context, Outcome<TResult> outcome, int attemptNumber, TimeSpan retryDelay, TimeSpan duration)
  Parameters
contextResilienceContextThe context in which the resilience operation or event occurred.
outcomeOutcome<TResult>The outcome of the resilience operation or event.
attemptNumberintThe zero-based attempt number.
retryDelayTimeSpanThe delay before the next retry.
durationTimeSpanThe duration of this attempt.
Properties
AttemptNumber
Gets the zero-based attempt number.
public int AttemptNumber { get; }
  Property Value
Context
Gets the context of this event.
public ResilienceContext Context { get; }
  Property Value
Duration
Gets the duration of this attempt.
public TimeSpan Duration { get; }
  Property Value
Outcome
Gets the outcome that will be retried.
public Outcome<TResult> Outcome { get; }
  Property Value
- Outcome<TResult>
 
RetryDelay
Gets the delay before the next retry.
public TimeSpan RetryDelay { get; }