Class RetryExtensions
Inheritance
↳ object
↳ RetryExtensions
Inherited Members
Equals(object)
Equals(object, object)
GetHashCode()
GetType()
MemberwiseClone()
ReferenceEquals(object, object)
ToString()
Namespace: OptimaJet.Workflow.Core
Assembly: OptimaJet.Workflow.Core.dll
Syntaxpublic static class RetryExtensions
Methods
RetryAsync<T>(Func<Task<T>>, int, TimeSpan, CancellationToken, Func<Exception, bool>, bool)
Declarationpublic 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)
Type | Name | Description |
---|---|---|
Func<Task<T>> | taskFactory | |
int | retries | |
TimeSpan | delay | |
CancellationToken | cancellationToken | |
Func<Exception, bool> | isRetryAllowed | |
bool | progressiveDelay |
Type | Description |
---|---|
Task<T> |
RetryWithDefaultRetryAllowedChecker<T>(Func<Task<T>>, int, TimeSpan, CancellationToken)
Declarationpublic static Task<T> RetryWithDefaultRetryAllowedChecker<T>(this Func<Task<T>> taskFactory, int retries, TimeSpan delay, CancellationToken cancellationToken = default)
Type | Name | Description |
---|---|---|
Func<Task<T>> | taskFactory | |
int | retries | |
TimeSpan | delay | |
CancellationToken | cancellationToken |
Type | Description |
---|---|
Task<T> |
RetryAsync(Func<Task>, int, TimeSpan, CancellationToken, Func<Exception, bool>, bool)
Declarationpublic static Task RetryAsync(this Func<Task> taskFactory, int retries, TimeSpan delay, CancellationToken cancellationToken = default, Func<Exception, bool> isRetryAllowed = null, bool progressiveDelay = true)
Type | Name | Description |
---|---|---|
Func<Task> | taskFactory | |
int | retries | |
TimeSpan | delay | |
CancellationToken | cancellationToken | |
Func<Exception, bool> | isRetryAllowed | |
bool | progressiveDelay |
Type | Description |
---|---|
Task |
RetryWithDefaultRetryAllowedChecker(Func<Task>, int, TimeSpan, CancellationToken)
Declarationpublic static Task RetryWithDefaultRetryAllowedChecker(this Func<Task> taskFactory, int retries, TimeSpan delay, CancellationToken cancellationToken = default)
Type | Name | Description |
---|---|---|
Func<Task> | taskFactory | |
int | retries | |
TimeSpan | delay | |
CancellationToken | cancellationToken |
Type | Description |
---|---|
Task |