RetryContext Struct
- Namespace
- Kampute.Resilience
- Assembly
- Kampute.Resilience.dll
Definition
Describes a failed attempt and the delay before the operation is retried.
public readonly struct RetryContextRemarks
Properties
AttemptNumber
Gets the number of the attempt that failed.
public uint AttemptNumber { get; }Property Value
- uint
- A one-based number within this execution; the initial attempt is 1. It is also the number of retries made once this retry starts.
Delay
Gets the delay before the next attempt.
public TimeSpan Delay { get; }Property Value
- TimeSpan
- In a delay override, the delay that the strategy proposes; in a retry handler, the delay that execution waits.
Elapsed
Gets the time since execution started when the outcome of the attempt was evaluated.
public TimeSpan Elapsed { get; }Property Value
- TimeSpan
- The elapsed execution time, including earlier attempts and waits.
Exception
Gets the exception thrown by the attempt.
public Exception Exception { get; }Property Value
- Exception
- The original exception, or
nullwhen a RetryPolicy<T> retries a returned result.

nullfor a retried result.