A library for retrying operations.
var result = RetryBuilder.Default.Build(() => { i = value; }).Run();
result.IsSuccess
result.Result
var result = await RetryBuilder.Default.Build(() => Task.Run(() => { i = value; })).RunAsync();
result.IsSuccess
result.Result
var builder = RetryBuilder.Default.ConfigureOptions(options =>
{
options.RetryInterval = new ConstantRetryInterval(TimeSpan.FromMilliseconds(100));
});
var builder = RetryBuilder.Default.ConfigureOptions(options =>
{
options.RetryInterval =
new ExponentialRetryInterval(TimeSpan.FromMilliseconds(100), TimeSpan.FromSeconds(60));
});
You can check out the unit tests to see how to use it.