Class NoRetryPolicy
An implementation of IRetryPolicy that tries only once.
Inherited Members
Namespace: Unity.Cloud.Common
Syntax
public class NoRetryPolicy : IRetryPolicy
Methods
ExecuteAsync<T>(IRetryPolicy.RetriedOperation<T>, IRetryPolicy.ShouldRetryChecker<T>, CancellationToken, IProgress<RetryQueuedProgress>)
An async method that can retry an operation if it hasn't succeeded.
Declaration
public async Task<T> ExecuteAsync<T>(IRetryPolicy.RetriedOperation<T> retriedOperation, IRetryPolicy.ShouldRetryChecker<T> shouldRetryChecker, CancellationToken cancellationToken = default(CancellationToken), IProgress<RetryQueuedProgress> progress = null)
Parameters
Type | Name | Description |
---|---|---|
IRetryPolicy.RetriedOperation<T> | retriedOperation | The IRetryPolicy.RetriedOperation<T> that needs to be performed. |
IRetryPolicy.ShouldRetryChecker<T> | shouldRetryChecker | A IRetryPolicy.ShouldRetryChecker<T> that helps determine whether the |
CancellationToken | cancellationToken | Token to cancel the task execution. |
IProgress<RetryQueuedProgress> | progress | Provider for progress updates on queued retries. |
Returns
Type | Description |
---|---|
Task<T> | The result of the |
Type Parameters
Name | Description |
---|---|
T |
Implements
Exceptions
Type | Condition |
---|---|
RetryExecutionFailedException |
|
TimeoutException | When the retry policy expires. |
OperationCanceledException | When the |
InvalidArgumentException |
|