ExecutionStrategyTests.TestExecutionStrategy ExecutionStrategyTests.TestExecutionStrategy Class

Definition

public class TestExecutionStrategy : ExecutionStrategy, IExecutionStrategy
Public Class TestExecutionStrategy
    Inherits ExecutionStrategy
    Implements IExecutionStrategy
Inheritance
System.ObjectSystem.Object
ExecutionStrategyTests.TestExecutionStrategyExecutionStrategyTests.TestExecutionStrategy
Implements

Constructors

TestExecutionStrategy() TestExecutionStrategy()

public TestExecutionStrategy()
Public Sub New

TestExecutionStrategy(DbContext) TestExecutionStrategy(DbContext)

public TestExecutionStrategy(DbContext context)
Public Sub New(context As DbContext)
Parameters

Properties

Context Context

The context on which the operations will be invoked.

(Inherited from ExecutionStrategy)

ExceptionsEncountered ExceptionsEncountered

The list of exceptions that caused the operation to be retried so far.

(Inherited from ExecutionStrategy)

Logger Logger

The logger for this ExecutionStrategy.

(Inherited from ExecutionStrategy)

MaxRetryCount MaxRetryCount

The maximum number of retry attempts.

(Inherited from ExecutionStrategy)

MaxRetryDelay MaxRetryDelay

The maximum delay in milliseconds between retries.

(Inherited from ExecutionStrategy)

Random Random

A pseudo-random number generater that can be used to vary the delay between retries.

(Inherited from ExecutionStrategy)

RetriesOnFailure RetriesOnFailure

Indicates whether this IExecutionStrategy might retry the execution after a failure.

(Inherited from ExecutionStrategy)

Suspended Suspended

public static bool Suspended { get; set; }
Public Shared Property Suspended As Boolean
Value
System.Boolean System.Boolean

Methods

Equals(Object) Equals(Object)

Inherited from System.Object

Equals(Object, Object) Equals(Object, Object)

Inherited from System.Object

Execute(Func, TState) Execute(Of TState, TResult)(Func(Of TState, TResult), TState)

Inherited from ExecutionStrategy

ExecuteAsync(Func>, TState, CancellationToken) ExecuteAsync(Of TState, TResult)(Func(Of TState, CancellationToken, Task(Of TResult)), TState, CancellationToken)

Inherited from ExecutionStrategy

GetHashCode() GetHashCode()

Inherited from System.Object

GetNextDelay(Exception) GetNextDelay(Exception)

Determines whether the operation should be retried and the delay before the next attempt.

(Inherited from ExecutionStrategy)

GetType() GetType()

Inherited from System.Object

MemberwiseClone() MemberwiseClone()

Inherited from System.Object

OnFirstExecution() OnFirstExecution()

Method called before the first operation execution

(Inherited from ExecutionStrategy)

OnRetry() OnRetry()

Method called before retrying the operation execution

(Inherited from ExecutionStrategy)

ReferenceEquals(Object, Object) ReferenceEquals(Object, Object)

Inherited from System.Object

ShouldRetryOn(Exception) ShouldRetryOn(Exception)

protected override bool ShouldRetryOn(Exception exception)
Protected Overrides Function ShouldRetryOn(exception As Exception) As Boolean
Parameters
exception
System.Exception System.Exception
Returns
System.Boolean System.Boolean
Overrides

ToString() ToString()

Inherited from System.Object

UnwrapAndHandleException(Exception, Func) UnwrapAndHandleException(Of T)(Exception, Func(Of Exception, T))

Inherited from ExecutionStrategy

Fields

DefaultMaxDelay DefaultMaxDelay

The default maximum time delay between retries, must be nonnegative.

(Inherited from ExecutionStrategy)

DefaultMaxRetryCount DefaultMaxRetryCount

The default number of retry attempts.

(Inherited from ExecutionStrategy)