Class TransientOperation
Provides developers ways to make their applications more resilient by adding robust transient fault handling logic ideal for temporary condition such as network connectivity issues or service unavailability.
Inheritance
Namespace: Cuemon
Assembly: Cuemon.Core.dll
Syntax
public static class TransientOperation
Properties
| Improve this DocFaultCallback
Gets or sets the callback delegate that is invoked when a transient fault occurs.
Declaration
public static Action<TransientFaultEvidence> FaultCallback { get; set; }
Property Value
Type | Description |
---|---|
System.Action<TransientFaultEvidence> | A callback delegate that is invoked when a transient fault occurs. |
Methods
| Improve this DocTryWithFunc<TResult, TSuccess>(TesterFunc<TResult, TSuccess>, out TResult, 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.
Declaration
public static TSuccess TryWithFunc<TResult, TSuccess>(TesterFunc<TResult, TSuccess> faultSensitiveMethod, out TResult result, Action<TransientOperationOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
TesterFunc<TResult, TSuccess> | faultSensitiveMethod | The fault sensitive function 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. |
TResult | result | The result of the function delegate |
System.Action<TransientOperationOptions> | setup | The TransientOperationOptions which need to be configured. |
Returns
Type | Description |
---|---|
TSuccess | The return value that indicates success of the function delegate |
Type Parameters
Name | Description |
---|---|
TResult | The type of the out result value of the function delegate encapsulates |
TSuccess | The type of the return value that indicates success of the function delegate |
TryWithFunc<T, TResult, TSuccess>(TesterFunc<T, TResult, TSuccess>, T, out TResult, 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.
Declaration
public static TSuccess TryWithFunc<T, TResult, TSuccess>(TesterFunc<T, TResult, TSuccess> faultSensitiveMethod, T arg, out TResult result, Action<TransientOperationOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
TesterFunc<T, TResult, TSuccess> | faultSensitiveMethod | The fault sensitive function 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. |
T | arg | The parameter of the function delegate |
TResult | result | The result of the function delegate |
System.Action<TransientOperationOptions> | setup | The TransientOperationOptions which need to be configured. |
Returns
Type | Description |
---|---|
TSuccess | The return value that indicates success of the function delegate |
Type Parameters
Name | Description |
---|---|
T | The type of the parameter of the function delegate |
TResult | The type of the out result value of the function delegate encapsulates |
TSuccess | The type of the return value that indicates success of the function delegate |
TryWithFunc<T1, T2, TResult, TSuccess>(TesterFunc<T1, T2, TResult, TSuccess>, T1, T2, out TResult, 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.
Declaration
public static TSuccess TryWithFunc<T1, T2, TResult, TSuccess>(TesterFunc<T1, T2, TResult, TSuccess> faultSensitiveMethod, T1 arg1, T2 arg2, out TResult result, Action<TransientOperationOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
TesterFunc<T1, T2, TResult, TSuccess> | faultSensitiveMethod | The fault sensitive function 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. |
T1 | arg1 | The first parameter of the function delegate |
T2 | arg2 | The second parameter of the function delegate |
TResult | result | The result of the function delegate |
System.Action<TransientOperationOptions> | setup | The TransientOperationOptions which need to be configured. |
Returns
Type | Description |
---|---|
TSuccess | The return value that indicates success of the function delegate |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the function delegate |
T2 | The type of the second parameter of the function delegate |
TResult | The type of the out result value of the function delegate encapsulates |
TSuccess | The type of the return value that indicates success of the function delegate |
TryWithFunc<T1, T2, T3, TResult, TSuccess>(TesterFunc<T1, T2, T3, TResult, TSuccess>, T1, T2, T3, out TResult, 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.
Declaration
public static TSuccess TryWithFunc<T1, T2, T3, TResult, TSuccess>(TesterFunc<T1, T2, T3, TResult, TSuccess> faultSensitiveMethod, T1 arg1, T2 arg2, T3 arg3, out TResult result, Action<TransientOperationOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
TesterFunc<T1, T2, T3, TResult, TSuccess> | faultSensitiveMethod | The fault sensitive function 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. |
T1 | arg1 | The first parameter of the function delegate |
T2 | arg2 | The second parameter of the function delegate |
T3 | arg3 | The third parameter of the function delegate |
TResult | result | The result of the function delegate |
System.Action<TransientOperationOptions> | setup | The TransientOperationOptions which need to be configured. |
Returns
Type | Description |
---|---|
TSuccess | The return value that indicates success of the function delegate |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the function delegate |
T2 | The type of the second parameter of the function delegate |
T3 | The type of the third parameter of the function delegate |
TResult | The type of the out result value of the function delegate encapsulates |
TSuccess | The type of the return value that indicates success of the function delegate |
TryWithFunc<T1, T2, T3, T4, TResult, TSuccess>(TesterFunc<T1, T2, T3, T4, TResult, TSuccess>, T1, T2, T3, T4, out TResult, 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.
Declaration
public static TSuccess TryWithFunc<T1, T2, T3, T4, TResult, TSuccess>(TesterFunc<T1, T2, T3, T4, TResult, TSuccess> faultSensitiveMethod, T1 arg1, T2 arg2, T3 arg3, T4 arg4, out TResult result, Action<TransientOperationOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
TesterFunc<T1, T2, T3, T4, TResult, TSuccess> | faultSensitiveMethod | The fault sensitive function 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. |
T1 | arg1 | The first parameter of the function delegate |
T2 | arg2 | The second parameter of the function delegate |
T3 | arg3 | The third parameter of the function delegate |
T4 | arg4 | The fourth parameter of the function delegate |
TResult | result | The result of the function delegate |
System.Action<TransientOperationOptions> | setup | The TransientOperationOptions which need to be configured. |
Returns
Type | Description |
---|---|
TSuccess | The return value that indicates success of the function delegate |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the function delegate |
T2 | The type of the second parameter of the function delegate |
T3 | The type of the third parameter of the function delegate |
T4 | The type of the fourth parameter of the function delegate |
TResult | The type of the out result value of the function delegate encapsulates |
TSuccess | The type of the return value that indicates success of the function delegate |
TryWithFunc<T1, T2, T3, T4, T5, TResult, TSuccess>(TesterFunc<T1, T2, T3, T4, T5, TResult, TSuccess>, T1, T2, T3, T4, T5, out TResult, 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.
Declaration
public static TSuccess TryWithFunc<T1, T2, T3, T4, T5, TResult, TSuccess>(TesterFunc<T1, T2, T3, T4, T5, TResult, TSuccess> faultSensitiveMethod, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, out TResult result, Action<TransientOperationOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
TesterFunc<T1, T2, T3, T4, T5, TResult, TSuccess> | faultSensitiveMethod | The fault sensitive function 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. |
T1 | arg1 | The first parameter of the function delegate |
T2 | arg2 | The second parameter of the function delegate |
T3 | arg3 | The third parameter of the function delegate |
T4 | arg4 | The fourth parameter of the function delegate |
T5 | arg5 | The fifth parameter of the function delegate |
TResult | result | The result of the function delegate |
System.Action<TransientOperationOptions> | setup | The TransientOperationOptions which need to be configured. |
Returns
Type | Description |
---|---|
TSuccess | The return value that indicates success of the function delegate |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the function delegate |
T2 | The type of the second parameter of the function delegate |
T3 | The type of the third parameter of the function delegate |
T4 | The type of the fourth parameter of the function delegate |
T5 | The type of the fifth parameter of the function delegate |
TResult | The type of the out result value of the function delegate encapsulates |
TSuccess | The type of the return value that indicates success of the function delegate |
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.
Declaration
public static void WithAction(Action faultSensitiveMethod, Action<TransientOperationOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Action | faultSensitiveMethod | 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. |
System.Action<TransientOperationOptions> | setup | The TransientOperationOptions which need to be configured. |
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.
Declaration
public static void WithAction<T>(Action<T> faultSensitiveMethod, T arg, Action<TransientOperationOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Action<T> | faultSensitiveMethod | 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. |
T | arg | The parameter of the delegate |
System.Action<TransientOperationOptions> | setup | The TransientOperationOptions which need to be configured. |
Type Parameters
Name | Description |
---|---|
T | The type of the parameter of the delegate |
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.
Declaration
public static void WithAction<T1, T2>(Action<T1, T2> faultSensitiveMethod, T1 arg1, T2 arg2, Action<TransientOperationOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Action<T1, T2> | faultSensitiveMethod | 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. |
T1 | arg1 | The first parameter of the delegate |
T2 | arg2 | The second parameter of the delegate |
System.Action<TransientOperationOptions> | setup | The TransientOperationOptions which need to be configured. |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the delegate |
T2 | The type of the second parameter of the delegate |
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.
Declaration
public static void WithAction<T1, T2, T3>(Action<T1, T2, T3> faultSensitiveMethod, T1 arg1, T2 arg2, T3 arg3, Action<TransientOperationOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Action<T1, T2, T3> | faultSensitiveMethod | 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. |
T1 | arg1 | The first parameter of the delegate |
T2 | arg2 | The second parameter of the delegate |
T3 | arg3 | The third parameter of the delegate |
System.Action<TransientOperationOptions> | setup | The TransientOperationOptions which need to be configured. |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the delegate |
T2 | The type of the second parameter of the delegate |
T3 | The type of the third parameter of the delegate |
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.
Declaration
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
Type | Name | Description |
---|---|---|
System.Action<T1, T2, T3, T4> | faultSensitiveMethod | 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. |
T1 | arg1 | The first parameter of the delegate |
T2 | arg2 | The second parameter of the delegate |
T3 | arg3 | The third parameter of the delegate |
T4 | arg4 | The fourth parameter of the delegate |
System.Action<TransientOperationOptions> | setup | The TransientOperationOptions which need to be configured. |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the delegate |
T2 | The type of the second parameter of the delegate |
T3 | The type of the third parameter of the delegate |
T4 | The type of the fourth parameter of the delegate |
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.
Declaration
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
Type | Name | Description |
---|---|---|
System.Action<T1, T2, T3, T4, T5> | faultSensitiveMethod | 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. |
T1 | arg1 | The first parameter of the delegate |
T2 | arg2 | The second parameter of the delegate |
T3 | arg3 | The third parameter of the delegate |
T4 | arg4 | The fourth parameter of the delegate |
T5 | arg5 | The fifth parameter of the delegate |
System.Action<TransientOperationOptions> | setup | The TransientOperationOptions which need to be configured. |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the delegate |
T2 | The type of the second parameter of the delegate |
T3 | The type of the third parameter of the delegate |
T4 | The type of the fourth parameter of the delegate |
T5 | The type of the fifth parameter of the delegate |
WithActionAsync(Func<Task>, 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.
Declaration
public static Task WithActionAsync(Func<Task> faultSensitiveMethod, Action<TransientOperationOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Func<System.Threading.Tasks.Task> | faultSensitiveMethod | The fault sensitive System.Threading.Tasks.Task based function 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. |
System.Action<TransientOperationOptions> | setup | The TransientOperationOptions which need to be configured. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
WithActionAsync<T>(Func<T, Task>, 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.
Declaration
public static Task WithActionAsync<T>(Func<T, Task> faultSensitiveMethod, T arg, Action<TransientOperationOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Func<T, System.Threading.Tasks.Task> | faultSensitiveMethod | The fault sensitive System.Threading.Tasks.Task based function 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. |
T | arg | The parameter of the delegate |
System.Action<TransientOperationOptions> | setup | The TransientOperationOptions which need to be configured. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Type Parameters
Name | Description |
---|---|
T | The type of the parameter of the delegate |
WithActionAsync<T1, T2>(Func<T1, T2, Task>, 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.
Declaration
public static Task WithActionAsync<T1, T2>(Func<T1, T2, Task> faultSensitiveMethod, T1 arg1, T2 arg2, Action<TransientOperationOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Func<T1, T2, System.Threading.Tasks.Task> | faultSensitiveMethod | The fault sensitive System.Threading.Tasks.Task based function 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. |
T1 | arg1 | The first parameter of the delegate |
T2 | arg2 | The second parameter of the delegate |
System.Action<TransientOperationOptions> | setup | The TransientOperationOptions which need to be configured. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the delegate |
T2 | The type of the second parameter of the delegate |
WithActionAsync<T1, T2, T3>(Func<T1, T2, T3, Task>, 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.
Declaration
public static Task WithActionAsync<T1, T2, T3>(Func<T1, T2, T3, Task> faultSensitiveMethod, T1 arg1, T2 arg2, T3 arg3, Action<TransientOperationOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Func<T1, T2, T3, System.Threading.Tasks.Task> | faultSensitiveMethod | The fault sensitive System.Threading.Tasks.Task based function 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. |
T1 | arg1 | The first parameter of the delegate |
T2 | arg2 | The second parameter of the delegate |
T3 | arg3 | The third parameter of the delegate |
System.Action<TransientOperationOptions> | setup | The TransientOperationOptions which need to be configured. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the delegate |
T2 | The type of the second parameter of the delegate |
T3 | The type of the third parameter of the delegate |
WithActionAsync<T1, T2, T3, T4>(Func<T1, T2, T3, T4, Task>, 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.
Declaration
public static Task WithActionAsync<T1, T2, T3, T4>(Func<T1, T2, T3, T4, Task> faultSensitiveMethod, T1 arg1, T2 arg2, T3 arg3, T4 arg4, Action<TransientOperationOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Func<T1, T2, T3, T4, System.Threading.Tasks.Task> | faultSensitiveMethod | The fault sensitive System.Threading.Tasks.Task based function 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. |
T1 | arg1 | The first parameter of the delegate |
T2 | arg2 | The second parameter of the delegate |
T3 | arg3 | The third parameter of the delegate |
T4 | arg4 | The fourth parameter of the delegate |
System.Action<TransientOperationOptions> | setup | The TransientOperationOptions which need to be configured. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the delegate |
T2 | The type of the second parameter of the delegate |
T3 | The type of the third parameter of the delegate |
T4 | The type of the fourth parameter of the delegate |
WithActionAsync<T1, T2, T3, T4, T5>(Func<T1, T2, T3, T4, T5, Task>, 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.
Declaration
public static Task WithActionAsync<T1, T2, T3, T4, T5>(Func<T1, T2, T3, T4, T5, Task> faultSensitiveMethod, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, Action<TransientOperationOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Func<T1, T2, T3, T4, T5, System.Threading.Tasks.Task> | faultSensitiveMethod | The fault sensitive System.Threading.Tasks.Task based function 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. |
T1 | arg1 | The first parameter of the delegate |
T2 | arg2 | The second parameter of the delegate |
T3 | arg3 | The third parameter of the delegate |
T4 | arg4 | The fourth parameter of the delegate |
T5 | arg5 | The fifth parameter of the delegate |
System.Action<TransientOperationOptions> | setup | The TransientOperationOptions which need to be configured. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the delegate |
T2 | The type of the second parameter of the delegate |
T3 | The type of the third parameter of the delegate |
T4 | The type of the fourth parameter of the delegate |
T5 | The type of the fifth parameter of the delegate |
WithFunc<TResult>(Func<TResult>, 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.
Declaration
public static TResult WithFunc<TResult>(Func<TResult> faultSensitiveMethod, Action<TransientOperationOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Func<TResult> | faultSensitiveMethod | The fault sensitive function 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. |
System.Action<TransientOperationOptions> | setup | The TransientOperationOptions which need to be configured. |
Returns
Type | Description |
---|---|
TResult | The result from the |
Type Parameters
Name | Description |
---|---|
TResult | The type of the return value of |
WithFunc<T, TResult>(Func<T, TResult>, 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.
Declaration
public static TResult WithFunc<T, TResult>(Func<T, TResult> faultSensitiveMethod, T arg, Action<TransientOperationOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Func<T, TResult> | faultSensitiveMethod | The fault sensitive function 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. |
T | arg | The parameter of the function delegate |
System.Action<TransientOperationOptions> | setup | The TransientOperationOptions which need to be configured. |
Returns
Type | Description |
---|---|
TResult | The result from the |
Type Parameters
Name | Description |
---|---|
T | The type of the parameter of the function delegate |
TResult | The type of the return value of the function delegate |
WithFunc<T1, T2, TResult>(Func<T1, T2, TResult>, 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.
Declaration
public static TResult WithFunc<T1, T2, TResult>(Func<T1, T2, TResult> faultSensitiveMethod, T1 arg1, T2 arg2, Action<TransientOperationOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Func<T1, T2, TResult> | faultSensitiveMethod | The fault sensitive function 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. |
T1 | arg1 | The first parameter of the function delegate |
T2 | arg2 | The second parameter of the function delegate |
System.Action<TransientOperationOptions> | setup | The TransientOperationOptions which need to be configured. |
Returns
Type | Description |
---|---|
TResult | The result from the |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the function delegate |
T2 | The type of the second parameter of the function delegate |
TResult | The type of the return value of the function delegate |
WithFunc<T1, T2, T3, TResult>(Func<T1, T2, T3, TResult>, 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.
Declaration
public static TResult WithFunc<T1, T2, T3, TResult>(Func<T1, T2, T3, TResult> faultSensitiveMethod, T1 arg1, T2 arg2, T3 arg3, Action<TransientOperationOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Func<T1, T2, T3, TResult> | faultSensitiveMethod | The fault sensitive function 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. |
T1 | arg1 | The first parameter of the function delegate |
T2 | arg2 | The second parameter of the function delegate |
T3 | arg3 | The third parameter of the function delegate |
System.Action<TransientOperationOptions> | setup | The TransientOperationOptions which need to be configured. |
Returns
Type | Description |
---|---|
TResult | The result from the |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the function delegate |
T2 | The type of the second parameter of the function delegate |
T3 | The type of the third parameter of the function delegate |
TResult | The type of the return value of the function delegate |
WithFunc<T1, T2, T3, T4, TResult>(Func<T1, T2, T3, T4, TResult>, 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.
Declaration
public static TResult WithFunc<T1, T2, T3, T4, TResult>(Func<T1, T2, T3, T4, TResult> faultSensitiveMethod, T1 arg1, T2 arg2, T3 arg3, T4 arg4, Action<TransientOperationOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Func<T1, T2, T3, T4, TResult> | faultSensitiveMethod | The fault sensitive function 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. |
T1 | arg1 | The first parameter of the function delegate |
T2 | arg2 | The second parameter of the function delegate |
T3 | arg3 | The third parameter of the function delegate |
T4 | arg4 | The fourth parameter of the function delegate |
System.Action<TransientOperationOptions> | setup | The TransientOperationOptions which need to be configured. |
Returns
Type | Description |
---|---|
TResult | The result from the |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the function delegate |
T2 | The type of the second parameter of the function delegate |
T3 | The type of the third parameter of the function delegate |
T4 | The type of the fourth parameter of the function delegate |
TResult | The type of the return value of the function delegate |
WithFunc<T1, T2, T3, T4, T5, TResult>(Func<T1, T2, T3, T4, T5, TResult>, 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.
Declaration
public static TResult WithFunc<T1, T2, T3, T4, T5, TResult>(Func<T1, T2, T3, T4, T5, TResult> faultSensitiveMethod, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, Action<TransientOperationOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Func<T1, T2, T3, T4, T5, TResult> | faultSensitiveMethod | The fault sensitive function 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. |
T1 | arg1 | The first parameter of the function delegate |
T2 | arg2 | The second parameter of the function delegate |
T3 | arg3 | The third parameter of the function delegate |
T4 | arg4 | The fourth parameter of the function delegate |
T5 | arg5 | The fifth parameter of the function delegate |
System.Action<TransientOperationOptions> | setup | The TransientOperationOptions which need to be configured. |
Returns
Type | Description |
---|---|
TResult | The result from the |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the function delegate |
T2 | The type of the second parameter of the function delegate |
T3 | The type of the third parameter of the function delegate |
T4 | The type of the fourth parameter of the function delegate |
T5 | The type of the fifth parameter of the function delegate |
TResult | The type of the return value of the function delegate |
WithFuncAsync<TResult>(Func<Task<TResult>>, 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.
Declaration
public static Task<TResult> WithFuncAsync<TResult>(Func<Task<TResult>> faultSensitiveMethod, Action<TransientOperationOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Func<System.Threading.Tasks.Task<TResult>> | faultSensitiveMethod | The fault sensitive function 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. |
System.Action<TransientOperationOptions> | setup | The TransientOperationOptions which need to be configured. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<TResult> | The result from the |
Type Parameters
Name | Description |
---|---|
TResult | The type of the return value of |
WithFuncAsync<T, TResult>(Func<T, Task<TResult>>, 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.
Declaration
public static Task<TResult> WithFuncAsync<T, TResult>(Func<T, Task<TResult>> faultSensitiveMethod, T arg, Action<TransientOperationOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Func<T, System.Threading.Tasks.Task<TResult>> | faultSensitiveMethod | The fault sensitive function 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. |
T | arg | The parameter of the function delegate |
System.Action<TransientOperationOptions> | setup | The TransientOperationOptions which need to be configured. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<TResult> | The result from the |
Type Parameters
Name | Description |
---|---|
T | The type of the parameter of the function delegate |
TResult | The type of the return value of the function delegate |
WithFuncAsync<T1, T2, TResult>(Func<T1, T2, Task<TResult>>, 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.
Declaration
public static Task<TResult> WithFuncAsync<T1, T2, TResult>(Func<T1, T2, Task<TResult>> faultSensitiveMethod, T1 arg1, T2 arg2, Action<TransientOperationOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Func<T1, T2, System.Threading.Tasks.Task<TResult>> | faultSensitiveMethod | The fault sensitive function 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. |
T1 | arg1 | The first parameter of the function delegate |
T2 | arg2 | The second parameter of the function delegate |
System.Action<TransientOperationOptions> | setup | The TransientOperationOptions which need to be configured. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<TResult> | The result from the |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the function delegate |
T2 | The type of the second parameter of the function delegate |
TResult | The type of the return value of the function delegate |
WithFuncAsync<T1, T2, T3, TResult>(Func<T1, T2, T3, Task<TResult>>, 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.
Declaration
public static Task<TResult> WithFuncAsync<T1, T2, T3, TResult>(Func<T1, T2, T3, Task<TResult>> faultSensitiveMethod, T1 arg1, T2 arg2, T3 arg3, Action<TransientOperationOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Func<T1, T2, T3, System.Threading.Tasks.Task<TResult>> | faultSensitiveMethod | The fault sensitive function 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. |
T1 | arg1 | The first parameter of the function delegate |
T2 | arg2 | The second parameter of the function delegate |
T3 | arg3 | The third parameter of the function delegate |
System.Action<TransientOperationOptions> | setup | The TransientOperationOptions which need to be configured. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<TResult> | The result from the |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the function delegate |
T2 | The type of the second parameter of the function delegate |
T3 | The type of the third parameter of the function delegate |
TResult | The type of the return value of the function delegate |
WithFuncAsync<T1, T2, T3, T4, TResult>(Func<T1, T2, T3, T4, Task<TResult>>, 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.
Declaration
public static Task<TResult> WithFuncAsync<T1, T2, T3, T4, TResult>(Func<T1, T2, T3, T4, Task<TResult>> faultSensitiveMethod, T1 arg1, T2 arg2, T3 arg3, T4 arg4, Action<TransientOperationOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Func<T1, T2, T3, T4, System.Threading.Tasks.Task<TResult>> | faultSensitiveMethod | The fault sensitive function 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. |
T1 | arg1 | The first parameter of the function delegate |
T2 | arg2 | The second parameter of the function delegate |
T3 | arg3 | The third parameter of the function delegate |
T4 | arg4 | The fourth parameter of the function delegate |
System.Action<TransientOperationOptions> | setup | The TransientOperationOptions which need to be configured. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<TResult> | The result from the |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the function delegate |
T2 | The type of the second parameter of the function delegate |
T3 | The type of the third parameter of the function delegate |
T4 | The type of the fourth parameter of the function delegate |
TResult | The type of the return value of the function delegate |
WithFuncAsync<T1, T2, T3, T4, T5, TResult>(Func<T1, T2, T3, T4, T5, Task<TResult>>, 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.
Declaration
public static Task<TResult> WithFuncAsync<T1, T2, T3, T4, T5, TResult>(Func<T1, T2, T3, T4, T5, Task<TResult>> faultSensitiveMethod, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, Action<TransientOperationOptions> setup = null)
Parameters
Type | Name | Description |
---|---|---|
System.Func<T1, T2, T3, T4, T5, System.Threading.Tasks.Task<TResult>> | faultSensitiveMethod | The fault sensitive function 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. |
T1 | arg1 | The first parameter of the function delegate |
T2 | arg2 | The second parameter of the function delegate |
T3 | arg3 | The third parameter of the function delegate |
T4 | arg4 | The fourth parameter of the function delegate |
T5 | arg5 | The fifth parameter of the function delegate |
System.Action<TransientOperationOptions> | setup | The TransientOperationOptions which need to be configured. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<TResult> | The result from the |
Type Parameters
Name | Description |
---|---|
T1 | The type of the first parameter of the function delegate |
T2 | The type of the second parameter of the function delegate |
T3 | The type of the third parameter of the function delegate |
T4 | The type of the fourth parameter of the function delegate |
T5 | The type of the fifth parameter of the function delegate |
TResult | The type of the return value of the function delegate |