Show / Hide Table of Contents

Class LinearRetryHandler

LinearRetryHandler is an IRetryHandler implementation, with a linearly growing interval between retries.

Inheritance
object
HttpMessageHandler
DelegatingHandler
IRetryHandler
LinearRetryHandler
Implements
IDisposable
Inherited Members
IRetryHandler.DefaultRetryInterval
IRetryHandler.DefaultMaxRetry
IRetryHandler.MaxRetries
IRetryHandler.RetryInterval
IRetryHandler.TransientStatusCodes
IRetryHandler.Dispose(bool)
DelegatingHandler.InnerHandler
HttpMessageHandler.Dispose()
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: QarnotSDK
Assembly: QarnotSDK.dll
Syntax
public class LinearRetryHandler : IRetryHandler, IDisposable

Constructors

LinearRetryHandler(int, int)

LinearRetryHandler constructor

Declaration
public LinearRetryHandler(int maxRetries = 3, int interval = 500)
Parameters
Type Name Description
int maxRetries

maximum number of retry

int interval

interval between retries in milliseconds

Methods

SendAsync(HttpRequestMessage, CancellationToken)

Handle asynchrone request with the retry policy

Declaration
protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
Parameters
Type Name Description
HttpRequestMessage request

the Http request

CancellationToken cancellationToken

cancellationg token to cancel the async request

Returns
Type Description
Task<HttpResponseMessage>

the HttpResponseMessage

Overrides
IRetryHandler.SendAsync(HttpRequestMessage, CancellationToken)

Implements

IDisposable
In this article
Back to top Generated by DocFX