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
intAn integer specifying the number of retries for the given operation. A value of zero signifies this is the first error encountered.
statusCode
intAn integer containing the status code for the last operation.
lastException
ExceptionAn Exception object that represents the last exception encountered.
retryInterval
TimeSpanA TimeSpan indicating the interval to wait until the next retry.
operationContext
OperationContextAn OperationContext object that represents the context for the current operation.
Returns
- bool
true
if the operation should be retried; otherwise,false
.