Skip to content

Instantly share code, notes, and snippets.

@hnabbasi
Last active July 26, 2018 16:32
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/872e0cfc799487ef9c735ec8257e6b7a to your computer and use it in GitHub Desktop.
Save hnabbasi/872e0cfc799487ef9c735ec8257e6b7a to your computer and use it in GitHub Desktop.
Polly MVVM
public interface INetworkService
{
Task<T> Retry<T>(Func<Task<T>> func, int retryCount, Func<Exception, int, Task> onRetry);
Task<T> WaitAndRetry<T>(Func<Task<T>> func, Func<int, TimeSpan> sleepDurationProvider, int retryCount,
Func<Exception, TimeSpan, Task> onRetryAsync);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment