Interface IRetryStrategy
- Namespace
- Kampute.HttpClient.Interfaces
- Assembly
- Kampute.HttpClient.dll
Defines a strategy for calculating the delay duration between retry attempts based on elapsed time and the number of attempts already made.
public interface IRetryStrategy
- Extension Methods
Methods
TryGetRetryDelay(TimeSpan, uint, out TimeSpan)
Calculates the delay duration for the next retry attempt and indicates whether a retry should be attempted.
bool TryGetRetryDelay(TimeSpan elapsed, uint attempts, out TimeSpan delay)
Parameters
elapsed
TimeSpanThe total time elapsed since the start of retry attempts.
attempts
uintThe count of retry attempts made so far.
delay
TimeSpanWhen this method returns, contains the calculated delay duration for the next retry attempt, if a retry is advisable. This parameter is passed uninitialized.