RetryHelper RetryHelper Class

Definition

public class RetryHelper
Public Class RetryHelper
Inheritance
RetryHelperRetryHelper

Methods

Equals(Object) Equals(Object)

Inherited from Object

Equals(Object, Object) Equals(Object, Object)

Inherited from Object

GetHashCode() GetHashCode()

Inherited from Object

GetType() GetType()

Inherited from Object

MemberwiseClone() MemberwiseClone()

Inherited from Object

ReferenceEquals(Object, Object) ReferenceEquals(Object, Object)

Inherited from Object

RetryOperation(Action, Action, Int32, Int32) RetryOperation(Action, Action(Of Exception), Int32, Int32)

public static void RetryOperation(Action retryBlock, Action<Exception> exceptionBlock, int retryCount = 3, int retryDelayMilliseconds = 0)
Public Shared Sub RetryOperation(retryBlock As Action, exceptionBlock As Action(Of Exception), retryCount As Integer = 3, retryDelayMilliseconds As Integer = 0)
Parameters
retryBlock
Action Action
exceptionBlock
System.Action<Exception> System.Action(Of Exception)
retryCount
Int32 Int32
retryDelayMilliseconds
Int32 Int32

RetryRequest(Func<>>, ILogger, CancellationToken, Int32) RetryRequest(Func(Of Task(Of HttpResponseMessage)), ILogger, CancellationToken, Int32)

Retries every 1 sec for 60 times by default.

public static Task<HttpResponseMessage> RetryRequest(Func<Task<HttpResponseMessage>> retryBlock, ILogger logger, CancellationToken cancellationToken = null, int retryCount = 60)
Public Shared Function RetryRequest(retryBlock As Func(Of Task(Of HttpResponseMessage)), logger As ILogger, cancellationToken As CancellationToken = Nothing, retryCount As Integer = 60) As Task(Of HttpResponseMessage)
Parameters
retryBlock
System.Func<System.Threading.Tasks.Task<HttpResponseMessage>> System.Func(Of System.Threading.Tasks.Task(Of HttpResponseMessage))
logger
ILogger ILogger
retryCount
Int32 Int32
Returns
System.Threading.Tasks.Task<HttpResponseMessage> System.Threading.Tasks.Task(Of HttpResponseMessage)

ToString() ToString()

Inherited from Object