C#
C++
F#
VB
ExponentialRetry.::..ShouldRetry Method (Int32, Int32, Exception, TimeSpan, OperationContext)(Int32, Int32, Exception^, TimeSpan%, OperationContext^)(Int32, Int32, Exception, TimeSpan, OperationContext)(Int32, Int32, Exception, TimeSpan, OperationContext)
Determines whether the operation should be retried and the interval until the next retry.
Assembly: Microsoft.WindowsAzure.Storage (in Microsoft.WindowsAzure.Storage.dll)
Syntax
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
abstract ShouldRetry : currentRetryCount:int * statusCode:int * lastException:Exception * retryInterval:TimeSpan byref * operationContext:OperationContext -> bool override ShouldRetry : currentRetryCount:int * statusCode:int * lastException:Exception * retryInterval:TimeSpan byref * operationContext:OperationContext -> bool
Public Function ShouldRetry ( currentRetryCount As Integer, statusCode As Integer, lastException As Exception, <OutAttribute> ByRef retryInterval As TimeSpan, operationContext As OperationContext ) As Boolean
Parameters
- currentRetryCount
-
Type:
System.Int32System::Int32System.Int32System.Int32
An integer specifying the number of retries for the given operation. A value of zero signifies this is the first error encountered.
- statusCode
-
Type:
System.Int32System::Int32System.Int32System.Int32
An integer containing the status code for the last operation.
- lastException
-
Type:
System.ExceptionSystem::Exception^System.ExceptionSystem.Exception
An Exception object that represents the last exception encountered.
- retryInterval
-
Type:
System.TimeSpanSystem::TimeSpan%System.TimeSpanSystem.TimeSpan
A TimeSpan indicating the interval to wait until the next retry.
- operationContext
-
Type:
Microsoft.WindowsAzure.Storage.OperationContextMicrosoft.WindowsAzure.Storage::OperationContext^Microsoft.WindowsAzure.Storage.OperationContextMicrosoft.WindowsAzure.Storage.OperationContext
An OperationContext object that represents the context for the current operation.
Return Value
Type: System.BooleanSystem::BooleanSystem.BooleanSystem.Booleantrue if the operation should be retried; otherwise, false.