NoRetry.ShouldRetry Method

Windows Runtime Azure Storage Client Library

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

Namespace: Microsoft.WindowsAzure.Storage.RetryPolicies
Assembly: Microsoft.WindowsAzure.Storage (in Microsoft.WindowsAzure.Storage.dll)

Usage

Visual Basic
Dim instance As NoRetry
Dim currentRetryCount As Integer
Dim statusCode As Integer
Dim lastException As Exception
Dim retryInterval As TimeSpan
Dim operationContext As OperationContext
Dim returnValue As Boolean

returnValue = instance.ShouldRetry(currentRetryCount, statusCode, lastException, retryInterval, operationContext)

Syntax

Visual Basic
Public Function ShouldRetry ( _
	currentRetryCount As Integer, _
	statusCode As Integer, _
	lastException As Exception, _
	<OutAttribute> ByRef retryInterval As TimeSpan, _
	operationContext As OperationContext _
) As Boolean
C#
public bool ShouldRetry (
	int currentRetryCount,
	int statusCode,
	Exception lastException,
	out TimeSpan retryInterval,
	OperationContext operationContext
)
C++
public:
virtual bool ShouldRetry (
	int currentRetryCount, 
	int statusCode, 
	Exception^ lastException, 
	[OutAttribute] TimeSpan% retryInterval, 
	OperationContext^ operationContext
) sealed
J#
public final boolean ShouldRetry (
	int currentRetryCount, 
	int statusCode, 
	Exception lastException, 
	/** @attribute OutAttribute() */ /** @ref */ TimeSpan retryInterval, 
	OperationContext operationContext
)
JScript

Parameters

currentRetryCount

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

statusCode

An integer containing the status code for the last operation.

lastException

An Exception object that represents the last exception encountered.

retryInterval

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

operationContext

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

Return Value

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

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows Vista, Windows 7, Windows Server 2008, Windows 8.1, Windows Server 2012 R2, Windows 8 and Windows Server 2012

Target Platforms

See Also