Skip to content

Instantly share code, notes, and snippets.

@hnabbasi
Last active July 11, 2018 22:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hnabbasi/8ff9e16c07be79f0fd1b117e10858e15 to your computer and use it in GitHub Desktop.
Save hnabbasi/8ff9e16c07be79f0fd1b117e10858e15 to your computer and use it in GitHub Desktop.
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