Show / Hide Table of Contents

Class NoopExecutionStrategy

An IExecutionStrategy that doesn't retry operations if they fail.

Inheritance
Object
NoopExecutionStrategy
Inherited Members
System.Object.ToString()
Object.Equals(Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
Object.MemberwiseClone()
Namespace: IRM.TransientFaultHandling
Assembly: IRM.dll
Syntax
public class NoopExecutionStrategy : IExecutionStrategy

Properties

RetriesOnFailure

Returns false to indicate that NoopExecutionStrategy will not retry the execution after a failure.

Declaration
public bool RetriesOnFailure { get; }
Property Value
Boolean

Implements
IExecutionStrategy.RetriesOnFailure

Methods

Execute<TResult>(Func<TResult>)

Executes the specified operation once and returns the result.

Declaration
public TResult Execute<TResult>(Func<TResult> operation)
Parameters
System.Func<TResult> operation

A delegate representing an executable operation that returns the result of type TResult.

Returns
TResult

The result from the operation.

Type Parameters
TResult

The return type of operation.

Implements
IExecutionStrategy.Execute<TResult>(Func<TResult>)

ExecuteAsync<TResult>(Func<CancellationToken, Task<TResult>>, CancellationToken)

Executes the specified asynchronous operation once, without retrying on failure.

Declaration
public Task<TResult> ExecuteAsync<TResult>(Func<CancellationToken, Task<TResult>> operation, CancellationToken cancellationToken)
Parameters
System.Func<System.Threading.CancellationToken, System.Threading.Tasks.Task<TResult>> operation

A function that returns a started task.

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<TResult>

A task that will run to completion if the original task completes successfully.

Type Parameters
TResult

The result type of the System.Threading.Tasks.Task<TResult> returned by operation.

Implements
IExecutionStrategy.ExecuteAsync<TResult>(Func<CancellationToken, Task<TResult>>, CancellationToken)

Extension Methods

ObjectExtensions.DeepClone<T>(T)
ExecutionStrategyExtensions.Execute(IExecutionStrategy, Action)
ExecutionStrategyExtensions.ExecuteAsync(IExecutionStrategy, Func<Task>)
ExecutionStrategyExtensions.ExecuteAsync(IExecutionStrategy, Func<CancellationToken, Task>, CancellationToken)
AnnotationsExtensions.IsValid(Object)
Back to top Generated by DocFX