Skip to content

Instantly share code, notes, and snippets.

@hnabbasi
Last active July 11, 2018 22:40
Embed
What would you like to do?
internal async Task<T> RetryInner<T>(Func<Task<T>> func,
int retryCount,
Func<Exception, int, Task> onRetry)
{
return await Policy
.Handle<Exception>()
.RetryAsync(retryCount, onRetry)
.ExecuteAsync<T>(func);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment