OnRetryArguments<TResult>
Represents the arguments used by OnRetry for handling the retry event.
using Polly.Utils;
using System;
using System.Runtime.CompilerServices;
namespace Polly.Retry
{
[System.Runtime.CompilerServices.NullableContext(1)]
[System.Runtime.CompilerServices.Nullable(0)]
public readonly struct OnRetryArguments<[System.Runtime.CompilerServices.Nullable(2)] TResult> : IOutcomeArguments<TResult>
{
[System.Runtime.CompilerServices.Nullable(new byte[] {
0,
1
})]
[field: System.Runtime.CompilerServices.Nullable(new byte[] {
0,
1
})]
public Outcome<TResult> Outcome {
[return: System.Runtime.CompilerServices.Nullable(new byte[] {
0,
1
})]
get;
}
public ResilienceContext Context { get; }
public int AttemptNumber { get; }
public TimeSpan RetryDelay { get; }
public TimeSpan Duration { get; }
public OnRetryArguments(ResilienceContext context, [System.Runtime.CompilerServices.Nullable(new byte[] {
0,
1
})] Outcome<TResult> outcome, int attemptNumber, TimeSpan retryDelay, TimeSpan duration)
{
Context = context;
Outcome = outcome;
AttemptNumber = attemptNumber;
RetryDelay = retryDelay;
Duration = duration;
}
}
}