private static void Main(string[] args) { RetryLoop loop = new RetryLoop(r => ReadFileAsync(r)); loop.ShouldRetry = r => r.ElapsedTime < TimeSpan.FromMinutes(1.0d); loop.Succeeded = r => (r.Exception == null) && (r.Get<string>("Text") == "TEST"); loop.BeforeRetry = r => BackoffAsync(r); loop.ExecuteAsync().Wait(); }
private static void Main(string[] args) { RetryLoop loop = new RetryLoop(r => ReadFileAsync(r)); loop.ShouldRetry = r => r.ElapsedTime < TimeSpan.FromMinutes(1.0d); loop.Succeeded = r => (r.Exception == null) && (r.Get <string>("Text") == "TEST"); loop.BeforeRetry = r => BackoffAsync(r); loop.ExecuteAsync().Wait(); }