ExecuteWithRetries(Func<int, Task>, int, Func<Exception, int, bool>, TimeSpan, IBackoffProvider)
static
public static Task ExecuteWithRetries(Func<int, Task> action, int maxNumErrorTries, Func<Exception, int, bool> retryExceptionFilter, TimeSpan maxExecutionTime, IBackoffProvider onErrorBackOff) Execute a given function a number of times, based on retry configuration parameters.
Parameters
actionFunc<int, Task>- The action to be executed.
maxNumErrorTriesint- The maximum number of retries.
retryExceptionFilterFunc<Exception, int, bool>- The retry exception filter.
maxExecutionTimeTimeSpan- The maximum execution time.
onErrorBackOffIBackoffProvider- The backoff provider.
Returns
A
System.Threading.Tasks.Task representing the operation. 