Workflow Engine .NET

Assembly: OptimaJet.Workflow.Core

Class RetryExtensions

OptimaJet.Workflow.Core.RetryExtensions

public static class RetryExtensions

Inheritance

  • System.Object

Methods

public static Task<T> RetryAsync<T>(this Func<Task<T>> taskFactory, int retries, TimeSpan delay, CancellationToken cancellationToken = default, Func<Exception, bool> isRetryAllowed = null, bool progressiveDelay = true) #

Parameters

Name
Type
Description
taskFactory
Func<Task<T>>
retries
Int32
delay
TimeSpan
cancellationToken
CancellationToken
isRetryAllowed
Func<Boolean>
progressiveDelay
Boolean

Returns

Type
Description
Task<T>
public static Task<T> RetryWithDefaultRetryAllowedChecker<T>(this Func<Task<T>> taskFactory, int retries, TimeSpan delay, CancellationToken cancellationToken = default) #

Parameters

Name
Type
Description
taskFactory
Func<Task<T>>
retries
Int32
delay
TimeSpan
cancellationToken
CancellationToken

Returns

Type
Description
Task<T>
public static Task RetryAsync(this Func<Task> taskFactory, int retries, TimeSpan delay, CancellationToken cancellationToken = default, Func<Exception, bool> isRetryAllowed = null, bool progressiveDelay = true) #

Parameters

Name
Type
Description
taskFactory
Func<Task>
retries
Int32
delay
TimeSpan
cancellationToken
CancellationToken
isRetryAllowed
Func<Boolean>
progressiveDelay
Boolean

Returns

Type
Description
Task
public static Task RetryWithDefaultRetryAllowedChecker(this Func<Task> taskFactory, int retries, TimeSpan delay, CancellationToken cancellationToken = default) #

Parameters

Name
Type
Description
taskFactory
Func<Task>
retries
Int32
delay
TimeSpan
cancellationToken
CancellationToken

Returns

Type
Description
Task