Class NoRetry
- Namespace
- Microsoft.ServiceBus
- Assembly
- Microsoft.ServiceBus.dll
Represents a retry policy that performs no retries.
public sealed class NoRetry : RetryPolicy
- Inheritance
-
NoRetry
- Inherited Members
Constructors
NoRetry()
Initializes a new instance of the NoRetry class.
public NoRetry()
Methods
Clone()
Creates a copy of this instance.
public override RetryPolicy Clone()
Returns
- RetryPolicy
The created copy of this instance.
IsRetryableException(Exception)
Determines whether it is permissible to retry after the specified exception.
protected override bool IsRetryableException(Exception lastException)
Parameters
lastException
ExceptionThe latest occurred exception.
Returns
- bool
If this method returns false, no retry occurs. Otherwise, the OnShouldRetry(TimeSpan, int, out TimeSpan) method determines when to retry.
OnShouldRetry(TimeSpan, int, out TimeSpan)
Calculates the retry interval for the retry policy.
protected override bool OnShouldRetry(TimeSpan remainingTime, int currentRetryCount, out TimeSpan retryInterval)
Parameters
remainingTime
TimeSpanThe remaining time.
currentRetryCount
intThe total number of retries.
retryInterval
TimeSpanThe retry interval.
Returns
- bool
If this method returns true, the retry operation occurs after the thread becomes idle for an amount of time equal to
retryInterval
.