Table of Contents

Class NoRetry

Namespace
Microsoft.WindowsAzure.Storage.RetryPolicies
Assembly
Microsoft.WindowsAzure.Storage.dll

Represents a retry policy that performs no retries.

public sealed class NoRetry : IRetryPolicy
Inheritance
NoRetry
Implements
Inherited Members

Constructors

NoRetry()

Initializes a new instance of the NoRetry class.

public NoRetry()

Methods

CreateInstance()

Generates a new retry policy for the current request attempt.

public IRetryPolicy CreateInstance()

Returns

IRetryPolicy

An IRetryPolicy object that represents the retry policy for the current request attempt.

ShouldRetry(int, int, Exception, out TimeSpan, OperationContext)

Determines if the operation should be retried and how long to wait until the next retry.

public bool ShouldRetry(int currentRetryCount, int statusCode, Exception lastException, out TimeSpan retryInterval, OperationContext operationContext)

Parameters

currentRetryCount int

An integer specifying the number of retries for the given operation. A value of zero signifies this is the first error encountered.

statusCode int

An integer containing the status code for the last operation.

lastException Exception

An Exception object that represents the last exception encountered.

retryInterval TimeSpan

A TimeSpan indicating the interval to wait until the next retry.

operationContext OperationContext

An OperationContext object that represents the context for the current operation.

Returns

bool

true if the operation should be retried; otherwise, false.