Class ExecutionStrategyExtensions
Extension methods for IExecutionStrategy
Inherited Members
System.Object.ToString()
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
Namespace: IRM.TransientFaultHandling
Assembly: IRM.dll
Syntax
public static class ExecutionStrategyExtensions
Methods
Execute(IExecutionStrategy, Action)
Executes the specified operation.
Declaration
public static void Execute(this IExecutionStrategy strategy, Action operation)
Parameters
|
IExecutionStrategy
strategy
The strategy that will be used for the execution. |
|
System.Action
operation
A delegate representing an executable operation that doesn't return any results. |
ExecuteAsync(IExecutionStrategy, Func<CancellationToken, Task>, CancellationToken)
Executes the specified async operation.
Declaration
public static async Task ExecuteAsync(this IExecutionStrategy strategy, Func<CancellationToken, Task> operation, CancellationToken cancellationToken = default(CancellationToken))
Parameters
|
IExecutionStrategy
strategy
The strategy that will be used for the execution. |
|
System.Func<System.Threading.CancellationToken, System.Threading.Tasks.Task>
operation
A delegate representing an executable async operation that doesn't return any results. |
|
System.Threading.CancellationToken
cancellationToken
A cancellation token used to cancel the retry operation, but not operations that are already in flight or that already completed successfully. |
Returns
|
System.Threading.Tasks.Task
|
ExecuteAsync(IExecutionStrategy, Func<Task>)
Executes the specified async operation.
Declaration
public static async Task ExecuteAsync(this IExecutionStrategy strategy, Func<Task> operation)
Parameters
|
IExecutionStrategy
strategy
The strategy that will be used for the execution. |
|
System.Func<System.Threading.Tasks.Task>
operation
A delegate representing an executable async operation that doesn't return any results. |
Returns
|
System.Threading.Tasks.Task
|