<PackageReference Include="Polly" Version="4.2.1" />

RetryPolicyStateWithCount

public RetryPolicyStateWithCount(int retryCount, Func<Exception, int, Context, Task> onRetryAsync, Context context)

public RetryPolicyStateWithCount(int retryCount, Func<Exception, int, Task> onRetryAsync)

public RetryPolicyStateWithCount(int retryCount, Action<Exception, int, Context> onRetry, Context context)

public RetryPolicyStateWithCount(int retryCount, Action<Exception, int> onRetry)

public bool CanRetry(Exception ex)

public Task<bool> CanRetryAsync(Exception ex, CancellationToken ct, bool continueOnCapturedContext)