Interface IRetryPolicy
Interface which abstracts Retry Policies.
Namespace: Unity.Cloud.Common
Assembly: Unity.Cloud.Common.dll
Syntax
public interface IRetryPolicy
  Methods
ExecuteAsync<T>(RetriedOperation<T>, ShouldRetryChecker<T>, CancellationToken, IProgress<RetryQueuedProgress>)
An async method that can retry an operation if it hasn't succeeded.
Declaration
Task<T> ExecuteAsync<T>(IRetryPolicy.RetriedOperation<T> retriedOperation, IRetryPolicy.ShouldRetryChecker<T> shouldRetryChecker, CancellationToken cancellationToken = default, 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 | The type of the result for the operation.  | 
      
Exceptions
| Type | Condition | 
|---|---|
| RetryExecutionFailedException | 
  | 
      
| TimeoutException | When the retry policy expires.  | 
      
| OperationCanceledException | When the   | 
      
| InvalidArgumentException | 
  |