Table of Contents

WithAction Method

Definition

Namespace
Cuemon.Resilience
Assemblies
Cuemon.Resilience.dll
Source
src/Cuemon.Resilience/TransientOperation.cs

WithAction(Action, Action<TransientOperationOptions>)

Repetitively executes the specified faultSensitiveMethod until the operation is successful, the amount of retry attempts has been reached, or a failed operation is not considered related to transient fault condition.

public static void WithAction(Action faultSensitiveMethod, Action<TransientOperationOptions> setup = null)

Parameters

faultSensitiveMethod Action

The fault sensitive delegate that is invoked until an operation is successful, the amount of retry attempts has been reached, or a failed operation is not considered related to transient fault condition.

setup Action<TransientOperationOptions>

The TransientOperationOptions which may be configured.

Exceptions

ArgumentNullException

faultSensitiveMethod cannot be null.

LatencyException

The faultSensitiveMethod exceeded the maximum time allowed to network latency.

AggregateException

The faultSensitiveMethod was a victim of a transient fault. The InnerExceptions collection contains a TransientFaultException object.

-or

An exception was thrown during the invocation of the faultSensitiveMethod. The InnerExceptions collection contains information about the exception or exceptions.

WithAction<T>(Action<T>, T, Action<TransientOperationOptions>)

Repetitively executes the specified faultSensitiveMethod until the operation is successful, the amount of retry attempts has been reached, or a failed operation is not considered related to transient fault condition.

public static void WithAction<T>(Action<T> faultSensitiveMethod, T arg, Action<TransientOperationOptions> setup = null)

Parameters

faultSensitiveMethod Action<T>

The fault sensitive delegate that is invoked until an operation is successful, the amount of retry attempts has been reached, or a failed operation is not considered related to transient fault condition.

arg T

The parameter of the delegate faultSensitiveMethod.

setup Action<TransientOperationOptions>

The TransientOperationOptions which may be configured.

Type Parameters

T

The type of the parameter of the delegate faultSensitiveMethod.

Exceptions

ArgumentNullException

faultSensitiveMethod cannot be null.

LatencyException

The faultSensitiveMethod exceeded the maximum time allowed to network latency.

AggregateException

The faultSensitiveMethod was a victim of a transient fault. The InnerExceptions collection contains a TransientFaultException object.

-or

An exception was thrown during the invocation of the faultSensitiveMethod. The InnerExceptions collection contains information about the exception or exceptions.

WithAction<T1, T2>(Action<T1, T2>, T1, T2, Action<TransientOperationOptions>)

Repetitively executes the specified faultSensitiveMethod until the operation is successful, the amount of retry attempts has been reached, or a failed operation is not considered related to transient fault condition.

public static void WithAction<T1, T2>(Action<T1, T2> faultSensitiveMethod, T1 arg1, T2 arg2, Action<TransientOperationOptions> setup = null)

Parameters

faultSensitiveMethod Action<T1, T2>

The fault sensitive delegate that is invoked until an operation is successful, the amount of retry attempts has been reached, or a failed operation is not considered related to transient fault condition.

arg1 T1

The first parameter of the delegate faultSensitiveMethod.

arg2 T2

The second parameter of the delegate faultSensitiveMethod.

setup Action<TransientOperationOptions>

The TransientOperationOptions which may be configured.

Type Parameters

T1

The type of the first parameter of the delegate faultSensitiveMethod.

T2

The type of the second parameter of the delegate faultSensitiveMethod.

Exceptions

ArgumentNullException

faultSensitiveMethod cannot be null.

LatencyException

The faultSensitiveMethod exceeded the maximum time allowed to network latency.

AggregateException

The faultSensitiveMethod was a victim of a transient fault. The InnerExceptions collection contains a TransientFaultException object.

-or

An exception was thrown during the invocation of the faultSensitiveMethod. The InnerExceptions collection contains information about the exception or exceptions.

WithAction<T1, T2, T3>(Action<T1, T2, T3>, T1, T2, T3, Action<TransientOperationOptions>)

Repetitively executes the specified faultSensitiveMethod until the operation is successful, the amount of retry attempts has been reached, or a failed operation is not considered related to transient fault condition.

public static void WithAction<T1, T2, T3>(Action<T1, T2, T3> faultSensitiveMethod, T1 arg1, T2 arg2, T3 arg3, Action<TransientOperationOptions> setup = null)

Parameters

faultSensitiveMethod Action<T1, T2, T3>

The fault sensitive delegate that is invoked until an operation is successful, the amount of retry attempts has been reached, or a failed operation is not considered related to transient fault condition.

arg1 T1

The first parameter of the delegate faultSensitiveMethod.

arg2 T2

The second parameter of the delegate faultSensitiveMethod.

arg3 T3

The third parameter of the delegate faultSensitiveMethod.

setup Action<TransientOperationOptions>

The TransientOperationOptions which may be configured.

Type Parameters

T1

The type of the first parameter of the delegate faultSensitiveMethod.

T2

The type of the second parameter of the delegate faultSensitiveMethod.

T3

The type of the third parameter of the delegate faultSensitiveMethod.

Exceptions

ArgumentNullException

faultSensitiveMethod cannot be null.

LatencyException

The faultSensitiveMethod exceeded the maximum time allowed to network latency.

AggregateException

The faultSensitiveMethod was a victim of a transient fault. The InnerExceptions collection contains a TransientFaultException object.

-or

An exception was thrown during the invocation of the faultSensitiveMethod. The InnerExceptions collection contains information about the exception or exceptions.

WithAction<T1, T2, T3, T4>(Action<T1, T2, T3, T4>, T1, T2, T3, T4, Action<TransientOperationOptions>)

Repetitively executes the specified faultSensitiveMethod until the operation is successful, the amount of retry attempts has been reached, or a failed operation is not considered related to transient fault condition.

public static void WithAction<T1, T2, T3, T4>(Action<T1, T2, T3, T4> faultSensitiveMethod, T1 arg1, T2 arg2, T3 arg3, T4 arg4, Action<TransientOperationOptions> setup = null)

Parameters

faultSensitiveMethod Action<T1, T2, T3, T4>

The fault sensitive delegate that is invoked until an operation is successful, the amount of retry attempts has been reached, or a failed operation is not considered related to transient fault condition.

arg1 T1

The first parameter of the delegate faultSensitiveMethod.

arg2 T2

The second parameter of the delegate faultSensitiveMethod.

arg3 T3

The third parameter of the delegate faultSensitiveMethod.

arg4 T4

The fourth parameter of the delegate faultSensitiveMethod.

setup Action<TransientOperationOptions>

The TransientOperationOptions which may be configured.

Type Parameters

T1

The type of the first parameter of the delegate faultSensitiveMethod.

T2

The type of the second parameter of the delegate faultSensitiveMethod.

T3

The type of the third parameter of the delegate faultSensitiveMethod.

T4

The type of the fourth parameter of the delegate faultSensitiveMethod.

Exceptions

ArgumentNullException

faultSensitiveMethod cannot be null.

LatencyException

The faultSensitiveMethod exceeded the maximum time allowed to network latency.

AggregateException

The faultSensitiveMethod was a victim of a transient fault. The InnerExceptions collection contains a TransientFaultException object.

-or

An exception was thrown during the invocation of the faultSensitiveMethod. The InnerExceptions collection contains information about the exception or exceptions.

WithAction<T1, T2, T3, T4, T5>(Action<T1, T2, T3, T4, T5>, T1, T2, T3, T4, T5, Action<TransientOperationOptions>)

Repetitively executes the specified faultSensitiveMethod until the operation is successful, the amount of retry attempts has been reached, or a failed operation is not considered related to transient fault condition.

public static void WithAction<T1, T2, T3, T4, T5>(Action<T1, T2, T3, T4, T5> faultSensitiveMethod, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, Action<TransientOperationOptions> setup = null)

Parameters

faultSensitiveMethod Action<T1, T2, T3, T4, T5>

The fault sensitive delegate that is invoked until an operation is successful, the amount of retry attempts has been reached, or a failed operation is not considered related to transient fault condition.

arg1 T1

The first parameter of the delegate faultSensitiveMethod.

arg2 T2

The second parameter of the delegate faultSensitiveMethod.

arg3 T3

The third parameter of the delegate faultSensitiveMethod.

arg4 T4

The fourth parameter of the delegate faultSensitiveMethod.

arg5 T5

The fifth parameter of the delegate faultSensitiveMethod.

setup Action<TransientOperationOptions>

The TransientOperationOptions which may be configured.

Type Parameters

T1

The type of the first parameter of the delegate faultSensitiveMethod.

T2

The type of the second parameter of the delegate faultSensitiveMethod.

T3

The type of the third parameter of the delegate faultSensitiveMethod.

T4

The type of the fourth parameter of the delegate faultSensitiveMethod.

T5

The type of the fifth parameter of the delegate faultSensitiveMethod.

Exceptions

ArgumentNullException

faultSensitiveMethod cannot be null.

LatencyException

The faultSensitiveMethod exceeded the maximum time allowed to network latency.

AggregateException

The faultSensitiveMethod was a victim of a transient fault. The InnerExceptions collection contains a TransientFaultException object.

-or

An exception was thrown during the invocation of the faultSensitiveMethod. The InnerExceptions collection contains information about the exception or exceptions.