Skip to main content

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

Syntax
public static class RetryExtensions

Methods

RetryAsync<T>(Func<Task<T>>, int, TimeSpan, CancellationToken, Func<Exception, bool>, bool)

Declaration
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
TypeNameDescription
Func<Task<T>>taskFactory
intretries
TimeSpandelay
CancellationTokencancellationToken
Func<Exception, bool>isRetryAllowed
boolprogressiveDelay
Returns
TypeDescription
Task<T>

RetryWithDefaultRetryAllowedChecker<T>(Func<Task<T>>, int, TimeSpan, CancellationToken)

Declaration
public static Task<T> RetryWithDefaultRetryAllowedChecker<T>(this Func<Task<T>> taskFactory, int retries, TimeSpan delay, CancellationToken cancellationToken = default)
Parameters
TypeNameDescription
Func<Task<T>>taskFactory
intretries
TimeSpandelay
CancellationTokencancellationToken
Returns
TypeDescription
Task<T>

RetryAsync(Func<Task>, int, TimeSpan, CancellationToken, Func<Exception, bool>, bool)

Declaration
public static Task RetryAsync(this Func<Task> taskFactory, int retries, TimeSpan delay, CancellationToken cancellationToken = default, Func<Exception, bool> isRetryAllowed = null, bool progressiveDelay = true)
Parameters
TypeNameDescription
Func<Task>taskFactory
intretries
TimeSpandelay
CancellationTokencancellationToken
Func<Exception, bool>isRetryAllowed
boolprogressiveDelay
Returns
TypeDescription
Task

RetryWithDefaultRetryAllowedChecker(Func<Task>, int, TimeSpan, CancellationToken)

Declaration
public static Task RetryWithDefaultRetryAllowedChecker(this Func<Task> taskFactory, int retries, TimeSpan delay, CancellationToken cancellationToken = default)
Parameters
TypeNameDescription
Func<Task>taskFactory
intretries
TimeSpandelay
CancellationTokencancellationToken
Returns
TypeDescription
Task