public static bool HasMaxAttemptsReached(RetryConfigurationBase configuration, int currentAttempt) => configuration.HasMaxAttemptsReached(currentAttempt);
public static bool ShouldExecute(TryResult tryResult, RetryConfigurationBase configuration, int currentAttempt, CancellationToken token) => !token.IsCancellationRequested && !tryResult.IsSucceeded && !configuration.HasMaxAttemptsReached(currentAttempt);