Last active
July 11, 2018 22:41
-
-
Save hnabbasi/07ba8244538579167cd0af378c2dbb5d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
internal async Task<T> WaitAndRetryInner<T>(Func<Task<T>> func, Func<int, TimeSpan> sleepDurationProvider, | |
int retryCount, | |
Func<Exception, TimeSpan, Task> onRetryAsync) | |
{ | |
return await Policy | |
.Handle<Exception>() | |
.WaitAndRetryAsync(retryCount, sleepDurationProvider, onRetryAsync) | |
.ExecuteAsync<T>(func); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment