Table of Contents

Class TransientOperation

Namespace
Cuemon.Resilience
Assembly
Cuemon.Resilience.dll

Provides a set of static methods that enable developers 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.

public static class TransientOperation
Inheritance
TransientOperation

Properties

FaultCallback

Gets or sets the callback delegate that is invoked when a transient fault occurs.

public static Action<TransientFaultEvidence> FaultCallback { get; set; }

Property Value

Action<TransientFaultEvidence>

A callback delegate that is invoked when a transient fault occurs.

Methods

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.

WithActionAsync(Func<CancellationToken, Task>, Action<AsyncTransientOperationOptions>)

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 Task WithActionAsync(Func<CancellationToken, Task> faultSensitiveMethod, Action<AsyncTransientOperationOptions> setup = null)

Parameters

faultSensitiveMethod Func<CancellationToken, Task>

The fault sensitive 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.

setup Action<AsyncTransientOperationOptions>

The AsyncTransientOperationOptions which may be configured.

Returns

Task

A task that represents the asynchronous operation.

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.

WithActionAsync<T>(Func<T, CancellationToken, Task>, T, Action<AsyncTransientOperationOptions>)

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 Task WithActionAsync<T>(Func<T, CancellationToken, Task> faultSensitiveMethod, T arg, Action<AsyncTransientOperationOptions> setup = null)

Parameters

faultSensitiveMethod Func<T, CancellationToken, Task>

The fault sensitive 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.

arg T

The parameter of the delegate faultSensitiveMethod.

setup Action<AsyncTransientOperationOptions>

The AsyncTransientOperationOptions which may be configured.

Returns

Task

A task that represents the asynchronous operation.

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.

WithActionAsync<T1, T2>(Func<T1, T2, CancellationToken, Task>, T1, T2, Action<AsyncTransientOperationOptions>)

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 Task WithActionAsync<T1, T2>(Func<T1, T2, CancellationToken, Task> faultSensitiveMethod, T1 arg1, T2 arg2, Action<AsyncTransientOperationOptions> setup = null)

Parameters

faultSensitiveMethod Func<T1, T2, CancellationToken, Task>

The fault sensitive 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.

arg1 T1

The first parameter of the delegate faultSensitiveMethod.

arg2 T2

The second parameter of the delegate faultSensitiveMethod.

setup Action<AsyncTransientOperationOptions>

The AsyncTransientOperationOptions which may be configured.

Returns

Task

A task that represents the asynchronous operation.

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.

WithActionAsync<T1, T2, T3>(Func<T1, T2, T3, CancellationToken, Task>, T1, T2, T3, Action<AsyncTransientOperationOptions>)

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 Task WithActionAsync<T1, T2, T3>(Func<T1, T2, T3, CancellationToken, Task> faultSensitiveMethod, T1 arg1, T2 arg2, T3 arg3, Action<AsyncTransientOperationOptions> setup = null)

Parameters

faultSensitiveMethod Func<T1, T2, T3, CancellationToken, Task>

The fault sensitive 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.

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

The AsyncTransientOperationOptions which may be configured.

Returns

Task

A task that represents the asynchronous operation.

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.

WithActionAsync<T1, T2, T3, T4>(Func<T1, T2, T3, T4, CancellationToken, Task>, T1, T2, T3, T4, Action<AsyncTransientOperationOptions>)

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 Task WithActionAsync<T1, T2, T3, T4>(Func<T1, T2, T3, T4, CancellationToken, Task> faultSensitiveMethod, T1 arg1, T2 arg2, T3 arg3, T4 arg4, Action<AsyncTransientOperationOptions> setup = null)

Parameters

faultSensitiveMethod Func<T1, T2, T3, T4, CancellationToken, Task>

The fault sensitive 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.

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

The AsyncTransientOperationOptions which may be configured.

Returns

Task

A task that represents the asynchronous operation.

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.

WithActionAsync<T1, T2, T3, T4, T5>(Func<T1, T2, T3, T4, T5, CancellationToken, Task>, T1, T2, T3, T4, T5, Action<AsyncTransientOperationOptions>)

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 Task WithActionAsync<T1, T2, T3, T4, T5>(Func<T1, T2, T3, T4, T5, CancellationToken, Task> faultSensitiveMethod, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, Action<AsyncTransientOperationOptions> setup = null)

Parameters

faultSensitiveMethod Func<T1, T2, T3, T4, T5, CancellationToken, Task>

The fault sensitive 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.

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

The AsyncTransientOperationOptions which may be configured.

Returns

Task

A task that represents the asynchronous operation.

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.

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.

public static TResult WithFunc<TResult>(Func<TResult> faultSensitiveMethod, Action<TransientOperationOptions> setup = null)

Parameters

faultSensitiveMethod Func<TResult>

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.

setup Action<TransientOperationOptions>

The TransientOperationOptions which may be configured.

Returns

TResult

The result from the faultSensitiveMethod.

Type Parameters

TResult

The type of the return value of 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.

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.

public static TResult WithFunc<T, TResult>(Func<T, TResult> faultSensitiveMethod, T arg, Action<TransientOperationOptions> setup = null)

Parameters

faultSensitiveMethod Func<T, TResult>

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.

arg T

The parameter of the function delegate faultSensitiveMethod.

setup Action<TransientOperationOptions>

The TransientOperationOptions which may be configured.

Returns

TResult

The result from the faultSensitiveMethod.

Type Parameters

T

The type of the parameter of the function delegate faultSensitiveMethod.

TResult

The type of the return value of the function 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.

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.

public static TResult WithFunc<T1, T2, TResult>(Func<T1, T2, TResult> faultSensitiveMethod, T1 arg1, T2 arg2, Action<TransientOperationOptions> setup = null)

Parameters

faultSensitiveMethod Func<T1, T2, TResult>

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.

arg1 T1

The first parameter of the function delegate faultSensitiveMethod.

arg2 T2

The second parameter of the function delegate faultSensitiveMethod.

setup Action<TransientOperationOptions>

The TransientOperationOptions which may be configured.

Returns

TResult

The result from the faultSensitiveMethod.

Type Parameters

T1

The type of the first parameter of the function delegate faultSensitiveMethod.

T2

The type of the second parameter of the function delegate faultSensitiveMethod.

TResult

The type of the return value of the function 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.

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.

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

faultSensitiveMethod Func<T1, T2, T3, TResult>

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.

arg1 T1

The first parameter of the function delegate faultSensitiveMethod.

arg2 T2

The second parameter of the function delegate faultSensitiveMethod.

arg3 T3

The third parameter of the function delegate faultSensitiveMethod.

setup Action<TransientOperationOptions>

The TransientOperationOptions which may be configured.

Returns

TResult

The result from the faultSensitiveMethod.

Type Parameters

T1

The type of the first parameter of the function delegate faultSensitiveMethod.

T2

The type of the second parameter of the function delegate faultSensitiveMethod.

T3

The type of the third parameter of the function delegate faultSensitiveMethod.

TResult

The type of the return value of the function 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.

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.

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

faultSensitiveMethod Func<T1, T2, T3, T4, TResult>

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.

arg1 T1

The first parameter of the function delegate faultSensitiveMethod.

arg2 T2

The second parameter of the function delegate faultSensitiveMethod.

arg3 T3

The third parameter of the function delegate faultSensitiveMethod.

arg4 T4

The fourth parameter of the function delegate faultSensitiveMethod.

setup Action<TransientOperationOptions>

The TransientOperationOptions which may be configured.

Returns

TResult

The result from the faultSensitiveMethod.

Type Parameters

T1

The type of the first parameter of the function delegate faultSensitiveMethod.

T2

The type of the second parameter of the function delegate faultSensitiveMethod.

T3

The type of the third parameter of the function delegate faultSensitiveMethod.

T4

The type of the fourth parameter of the function delegate faultSensitiveMethod.

TResult

The type of the return value of the function 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.

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.

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

faultSensitiveMethod Func<T1, T2, T3, T4, T5, TResult>

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.

arg1 T1

The first parameter of the function delegate faultSensitiveMethod.

arg2 T2

The second parameter of the function delegate faultSensitiveMethod.

arg3 T3

The third parameter of the function delegate faultSensitiveMethod.

arg4 T4

The fourth parameter of the function delegate faultSensitiveMethod.

arg5 T5

The fifth parameter of the function delegate faultSensitiveMethod.

setup Action<TransientOperationOptions>

The TransientOperationOptions which may be configured.

Returns

TResult

The result from the faultSensitiveMethod.

Type Parameters

T1

The type of the first parameter of the function delegate faultSensitiveMethod.

T2

The type of the second parameter of the function delegate faultSensitiveMethod.

T3

The type of the third parameter of the function delegate faultSensitiveMethod.

T4

The type of the fourth parameter of the function delegate faultSensitiveMethod.

T5

The type of the fifth parameter of the function delegate faultSensitiveMethod.

TResult

The type of the return value of the function 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.

WithFuncAsync<TResult>(Func<CancellationToken, Task<TResult>>, Action<AsyncTransientOperationOptions>)

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 Task<TResult> WithFuncAsync<TResult>(Func<CancellationToken, Task<TResult>> faultSensitiveMethod, Action<AsyncTransientOperationOptions> setup = null)

Parameters

faultSensitiveMethod Func<CancellationToken, Task<TResult>>

The fault sensitive Task<TResult> 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.

setup Action<AsyncTransientOperationOptions>

The AsyncTransientOperationOptions which may be configured.

Returns

Task<TResult>

The result from the faultSensitiveMethod.

Type Parameters

TResult

The type of the return value of the function 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.

WithFuncAsync<T, TResult>(Func<T, CancellationToken, Task<TResult>>, T, Action<AsyncTransientOperationOptions>)

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 Task<TResult> WithFuncAsync<T, TResult>(Func<T, CancellationToken, Task<TResult>> faultSensitiveMethod, T arg, Action<AsyncTransientOperationOptions> setup = null)

Parameters

faultSensitiveMethod Func<T, CancellationToken, Task<TResult>>

The fault sensitive Task<TResult> 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.

arg T

The parameter of the function delegate faultSensitiveMethod.

setup Action<AsyncTransientOperationOptions>

The AsyncTransientOperationOptions which may be configured.

Returns

Task<TResult>

The result from the faultSensitiveMethod.

Type Parameters

T

The type of the parameter of the function delegate faultSensitiveMethod.

TResult

The type of the return value of the function 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.

WithFuncAsync<T1, T2, TResult>(Func<T1, T2, CancellationToken, Task<TResult>>, T1, T2, Action<AsyncTransientOperationOptions>)

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 Task<TResult> WithFuncAsync<T1, T2, TResult>(Func<T1, T2, CancellationToken, Task<TResult>> faultSensitiveMethod, T1 arg1, T2 arg2, Action<AsyncTransientOperationOptions> setup = null)

Parameters

faultSensitiveMethod Func<T1, T2, CancellationToken, Task<TResult>>

The fault sensitive Task<TResult> 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.

arg1 T1

The first parameter of the function delegate faultSensitiveMethod.

arg2 T2

The second parameter of the function delegate faultSensitiveMethod.

setup Action<AsyncTransientOperationOptions>

The AsyncTransientOperationOptions which may be configured.

Returns

Task<TResult>

The result from the faultSensitiveMethod.

Type Parameters

T1

The type of the first parameter of the function delegate faultSensitiveMethod.

T2

The type of the second parameter of the function delegate faultSensitiveMethod.

TResult

The type of the return value of the function 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.

WithFuncAsync<T1, T2, T3, TResult>(Func<T1, T2, T3, CancellationToken, Task<TResult>>, T1, T2, T3, Action<AsyncTransientOperationOptions>)

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 Task<TResult> WithFuncAsync<T1, T2, T3, TResult>(Func<T1, T2, T3, CancellationToken, Task<TResult>> faultSensitiveMethod, T1 arg1, T2 arg2, T3 arg3, Action<AsyncTransientOperationOptions> setup = null)

Parameters

faultSensitiveMethod Func<T1, T2, T3, CancellationToken, Task<TResult>>

The fault sensitive Task<TResult> 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.

arg1 T1

The first parameter of the function delegate faultSensitiveMethod.

arg2 T2

The second parameter of the function delegate faultSensitiveMethod.

arg3 T3

The third parameter of the function delegate faultSensitiveMethod.

setup Action<AsyncTransientOperationOptions>

The AsyncTransientOperationOptions which may be configured.

Returns

Task<TResult>

The result from the faultSensitiveMethod.

Type Parameters

T1

The type of the first parameter of the function delegate faultSensitiveMethod.

T2

The type of the second parameter of the function delegate faultSensitiveMethod.

T3

The type of the third parameter of the function delegate faultSensitiveMethod.

TResult

The type of the return value of the function 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.

WithFuncAsync<T1, T2, T3, T4, TResult>(Func<T1, T2, T3, T4, CancellationToken, Task<TResult>>, T1, T2, T3, T4, Action<AsyncTransientOperationOptions>)

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 Task<TResult> WithFuncAsync<T1, T2, T3, T4, TResult>(Func<T1, T2, T3, T4, CancellationToken, Task<TResult>> faultSensitiveMethod, T1 arg1, T2 arg2, T3 arg3, T4 arg4, Action<AsyncTransientOperationOptions> setup = null)

Parameters

faultSensitiveMethod Func<T1, T2, T3, T4, CancellationToken, Task<TResult>>

The fault sensitive Task<TResult> 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.

arg1 T1

The first parameter of the function delegate faultSensitiveMethod.

arg2 T2

The second parameter of the function delegate faultSensitiveMethod.

arg3 T3

The third parameter of the function delegate faultSensitiveMethod.

arg4 T4

The fourth parameter of the function delegate faultSensitiveMethod.

setup Action<AsyncTransientOperationOptions>

The AsyncTransientOperationOptions which may be configured.

Returns

Task<TResult>

The result from the faultSensitiveMethod.

Type Parameters

T1

The type of the first parameter of the function delegate faultSensitiveMethod.

T2

The type of the second parameter of the function delegate faultSensitiveMethod.

T3

The type of the third parameter of the function delegate faultSensitiveMethod.

T4

The type of the fourth parameter of the function delegate faultSensitiveMethod.

TResult

The type of the return value of the function 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.

WithFuncAsync<T1, T2, T3, T4, T5, TResult>(Func<T1, T2, T3, T4, T5, CancellationToken, Task<TResult>>, T1, T2, T3, T4, T5, Action<AsyncTransientOperationOptions>)

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 Task<TResult> WithFuncAsync<T1, T2, T3, T4, T5, TResult>(Func<T1, T2, T3, T4, T5, CancellationToken, Task<TResult>> faultSensitiveMethod, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, Action<AsyncTransientOperationOptions> setup = null)

Parameters

faultSensitiveMethod Func<T1, T2, T3, T4, T5, CancellationToken, Task<TResult>>

The fault sensitive Task<TResult> 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.

arg1 T1

The first parameter of the function delegate faultSensitiveMethod.

arg2 T2

The second parameter of the function delegate faultSensitiveMethod.

arg3 T3

The third parameter of the function delegate faultSensitiveMethod.

arg4 T4

The fourth parameter of the function delegate faultSensitiveMethod.

arg5 T5

The fifth parameter of the function delegate faultSensitiveMethod.

setup Action<AsyncTransientOperationOptions>

The AsyncTransientOperationOptions which may be configured.

Returns

Task<TResult>

The result from the faultSensitiveMethod.

Type Parameters

T1

The type of the first parameter of the function delegate faultSensitiveMethod.

T2

The type of the second parameter of the function delegate faultSensitiveMethod.

T3

The type of the third parameter of the function delegate faultSensitiveMethod.

T4

The type of the fourth parameter of the function delegate faultSensitiveMethod.

T5

The type of the fifth parameter of the function delegate faultSensitiveMethod.

TResult

The type of the return value of the function 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.