WithAction Method
Definition
- Namespace
- Cuemon.Resilience
- Assemblies
- Cuemon.Resilience.dll
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
faultSensitiveMethodActionThe 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.
setupAction<TransientOperationOptions>The TransientOperationOptions which may be configured.
Exceptions
- ArgumentNullException
faultSensitiveMethodcannot be null.- LatencyException
The
faultSensitiveMethodexceeded the maximum time allowed to network latency.- AggregateException
The
faultSensitiveMethodwas 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
faultSensitiveMethodAction<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.
argTThe parameter of the delegate
faultSensitiveMethod.setupAction<TransientOperationOptions>The TransientOperationOptions which may be configured.
Type Parameters
TThe type of the parameter of the delegate
faultSensitiveMethod.
Exceptions
- ArgumentNullException
faultSensitiveMethodcannot be null.- LatencyException
The
faultSensitiveMethodexceeded the maximum time allowed to network latency.- AggregateException
The
faultSensitiveMethodwas 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
faultSensitiveMethodAction<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.
arg1T1The first parameter of the delegate
faultSensitiveMethod.arg2T2The second parameter of the delegate
faultSensitiveMethod.setupAction<TransientOperationOptions>The TransientOperationOptions which may be configured.
Type Parameters
T1The type of the first parameter of the delegate
faultSensitiveMethod.T2The type of the second parameter of the delegate
faultSensitiveMethod.
Exceptions
- ArgumentNullException
faultSensitiveMethodcannot be null.- LatencyException
The
faultSensitiveMethodexceeded the maximum time allowed to network latency.- AggregateException
The
faultSensitiveMethodwas 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
faultSensitiveMethodAction<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.
arg1T1The first parameter of the delegate
faultSensitiveMethod.arg2T2The second parameter of the delegate
faultSensitiveMethod.arg3T3The third parameter of the delegate
faultSensitiveMethod.setupAction<TransientOperationOptions>The TransientOperationOptions which may be configured.
Type Parameters
T1The type of the first parameter of the delegate
faultSensitiveMethod.T2The type of the second parameter of the delegate
faultSensitiveMethod.T3The type of the third parameter of the delegate
faultSensitiveMethod.
Exceptions
- ArgumentNullException
faultSensitiveMethodcannot be null.- LatencyException
The
faultSensitiveMethodexceeded the maximum time allowed to network latency.- AggregateException
The
faultSensitiveMethodwas 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
faultSensitiveMethodAction<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.
arg1T1The first parameter of the delegate
faultSensitiveMethod.arg2T2The second parameter of the delegate
faultSensitiveMethod.arg3T3The third parameter of the delegate
faultSensitiveMethod.arg4T4The fourth parameter of the delegate
faultSensitiveMethod.setupAction<TransientOperationOptions>The TransientOperationOptions which may be configured.
Type Parameters
T1The type of the first parameter of the delegate
faultSensitiveMethod.T2The type of the second parameter of the delegate
faultSensitiveMethod.T3The type of the third parameter of the delegate
faultSensitiveMethod.T4The type of the fourth parameter of the delegate
faultSensitiveMethod.
Exceptions
- ArgumentNullException
faultSensitiveMethodcannot be null.- LatencyException
The
faultSensitiveMethodexceeded the maximum time allowed to network latency.- AggregateException
The
faultSensitiveMethodwas 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
faultSensitiveMethodAction<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.
arg1T1The first parameter of the delegate
faultSensitiveMethod.arg2T2The second parameter of the delegate
faultSensitiveMethod.arg3T3The third parameter of the delegate
faultSensitiveMethod.arg4T4The fourth parameter of the delegate
faultSensitiveMethod.arg5T5The fifth parameter of the delegate
faultSensitiveMethod.setupAction<TransientOperationOptions>The TransientOperationOptions which may be configured.
Type Parameters
T1The type of the first parameter of the delegate
faultSensitiveMethod.T2The type of the second parameter of the delegate
faultSensitiveMethod.T3The type of the third parameter of the delegate
faultSensitiveMethod.T4The type of the fourth parameter of the delegate
faultSensitiveMethod.T5The type of the fifth parameter of the delegate
faultSensitiveMethod.
Exceptions
- ArgumentNullException
faultSensitiveMethodcannot be null.- LatencyException
The
faultSensitiveMethodexceeded the maximum time allowed to network latency.- AggregateException
The
faultSensitiveMethodwas 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.