Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save chester89/da02f7bc00517bae4acb20954e56db77 to your computer and use it in GitHub Desktop.
Save chester89/da02f7bc00517bae4acb20954e56db77 to your computer and use it in GitHub Desktop.
RetryInterface
public interface IBackoffStrategy
{
void RetryOnException(Action<Int32> intent, Int32 maxAttempts);
void RetryOnPredicate(Action<Int32> intent, Int32 maxAttempts, Func<Boolean> condition);
T RetryOnException<T>(Func<Int32, T> retrieve, Int32 maxAttempts);
T RetryOnOperationResult<T>(Func<Int32, T> retrieve, Int32 maxAttempts, Func<T, Boolean> retryCondition);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment