SqlAzureExecutionStrategy SqlAzureExecutionStrategy Class

Syntax

Declaration

public class SqlAzureExecutionStrategy : ExecutionStrategy, IExecutionStrategyPublic Class SqlAzureExecutionStrategy
    Inherits ExecutionStrategy
    Implements IExecutionStrategy

Inheritance Hierarchy

Inherited Members

DefaultMaxRetryCount,
DefaultMaxRetryCount,
DefaultMaxDelay,
DefaultMaxDelay,
ExceptionsEncountered,
ExceptionsEncountered,
Random,
Random,
MaxRetryCount,
MaxRetryCount,
MaxRetryDelay,
MaxRetryDelay,
Context,
Context,
Logger,
Logger,
Suspended,
Suspended,
RetriesOnFailure,
RetriesOnFailure,
Execute<TState, TResult>(Func<TState, TResult>, TState),
Execute(Of TState, TResult)(Func(Of TState, TResult), TState),
ExecuteAsync<TState, TResult>(Func<TState, CancellationToken, Task<TResult>>, TState, CancellationToken),
ExecuteAsync(Of TState, TResult)(Func(Of TState, CancellationToken, Task(Of TResult)), TState, CancellationToken),
OnFirstExecution(),
OnFirstExecution(),
OnRetry(),
OnRetry(),
GetNextDelay(Exception),
GetNextDelay(Exception),
UnwrapAndHandleException<T>(Exception, Func<Exception, T>),
UnwrapAndHandleException(Of T)(Exception, Func(Of Exception, T)),
ToString(),
ToString(),
Equals(Object),
Equals(Object),
Equals(Object, Object),
Equals(Object, Object),
ReferenceEquals(Object, Object),
ReferenceEquals(Object, Object),
GetHashCode(),
GetHashCode(),
GetType(),
GetType(),
MemberwiseClone()
MemberwiseClone()

Constructors summary

Creates a new instance of SqlAzureExecutionStrategy without a context.

Creates a new instance of SqlAzureExecutionStrategy.

Creates a new instance of SqlAzureExecutionStrategy.

Creates a new instance of SqlAzureExecutionStrategy.

Creates a new instance of SqlAzureExecutionStrategy.

Creates a new instance of SqlAzureExecutionStrategy.

Creates a new instance of SqlAzureExecutionStrategy.

Creates a new instance of SqlAzureExecutionStrategy without a context.

Creates a new instance of SqlAzureExecutionStrategy without a context.

Methods summary

Constructors

  • SqlAzureExecutionStrategy()
    SqlAzureExecutionStrategy()

    Creates a new instance of SqlAzureExecutionStrategy without a context.

    protected SqlAzureExecutionStrategy()Protected Sub New

    Remarks

    The default retry limit is 5, which means that the total amount of time spent before failing is 26 seconds plus the random factor.

  • SqlAzureExecutionStrategy(DbContext)
    SqlAzureExecutionStrategy(DbContext)

    Creates a new instance of SqlAzureExecutionStrategy.

    public SqlAzureExecutionStrategy(DbContext context)Public Sub New(context As DbContext)

    Parameters

    Remarks

    The default retry limit is 5, which means that the total amount of time spent before failing is 26 seconds plus the random factor.

  • SqlAzureExecutionStrategy(DbContext, Int32)
    SqlAzureExecutionStrategy(DbContext, Int32)

    Creates a new instance of SqlAzureExecutionStrategy.

    public SqlAzureExecutionStrategy(DbContext context, int maxRetryCount)Public Sub New(context As DbContext, maxRetryCount As Integer)

    Parameters

    • context

      The context on which the operations will be invoked.

    • maxRetryCount
      System.Int32
      System.Int32

      The maximum number of retry attempts.

  • SqlAzureExecutionStrategy(DbContext, Int32, TimeSpan, ICollection<Int32>)
    SqlAzureExecutionStrategy(DbContext, Int32, TimeSpan, ICollection(Of Int32))

    Creates a new instance of SqlAzureExecutionStrategy.

    public SqlAzureExecutionStrategy(DbContext context, int maxRetryCount, TimeSpan maxRetryDelay, ICollection<int> errorNumbersToAdd)Public Sub New(context As DbContext, maxRetryCount As Integer, maxRetryDelay As TimeSpan, errorNumbersToAdd As ICollection(Of Integer))

    Parameters

    • context

      The context on which the operations will be invoked.

    • maxRetryCount
      System.Int32
      System.Int32

      The maximum number of retry attempts.

    • maxRetryDelay
      System.TimeSpan
      System.TimeSpan

      The maximum delay in milliseconds between retries.

    • errorNumbersToAdd
      System.Collections.Generic.ICollection<T><System.Int32>
      System.Collections.Generic.ICollection<T>(Of System.Int32)

      Additional SQL error numbers that should be considered transient.

  • SqlAzureExecutionStrategy(ExecutionStrategyContext)
    SqlAzureExecutionStrategy(ExecutionStrategyContext)

    Creates a new instance of SqlAzureExecutionStrategy.

    public SqlAzureExecutionStrategy(ExecutionStrategyContext context)Public Sub New(context As ExecutionStrategyContext)

    Parameters

  • SqlAzureExecutionStrategy(ExecutionStrategyContext, Int32)
    SqlAzureExecutionStrategy(ExecutionStrategyContext, Int32)

    Creates a new instance of SqlAzureExecutionStrategy.

    public SqlAzureExecutionStrategy(ExecutionStrategyContext context, int maxRetryCount)Public Sub New(context As ExecutionStrategyContext, maxRetryCount As Integer)

    Parameters

  • SqlAzureExecutionStrategy(ExecutionStrategyContext, Int32, TimeSpan, ICollection<Int32>)
    SqlAzureExecutionStrategy(ExecutionStrategyContext, Int32, TimeSpan, ICollection(Of Int32))

    Creates a new instance of SqlAzureExecutionStrategy.

    public SqlAzureExecutionStrategy(ExecutionStrategyContext context, int maxRetryCount, TimeSpan maxRetryDelay, ICollection<int> errorNumbersToAdd)Public Sub New(context As ExecutionStrategyContext, maxRetryCount As Integer, maxRetryDelay As TimeSpan, errorNumbersToAdd As ICollection(Of Integer))

    Parameters

    • context

      The required dependencies.

    • maxRetryCount
      System.Int32
      System.Int32

      The maximum number of retry attempts.

    • maxRetryDelay
      System.TimeSpan
      System.TimeSpan

      The maximum delay in milliseconds between retries.

    • errorNumbersToAdd
      System.Collections.Generic.ICollection<T><System.Int32>
      System.Collections.Generic.ICollection<T>(Of System.Int32)

      Additional SQL error numbers that should be considered transient.

  • SqlAzureExecutionStrategy(Int32)
    SqlAzureExecutionStrategy(Int32)

    Creates a new instance of SqlAzureExecutionStrategy without a context.

    protected SqlAzureExecutionStrategy(int maxRetryCount)Protected Sub New(maxRetryCount As Integer)

    Parameters

    • maxRetryCount
      System.Int32
      System.Int32

      The maximum number of retry attempts.

  • SqlAzureExecutionStrategy(Int32, TimeSpan, ICollection<Int32>)
    SqlAzureExecutionStrategy(Int32, TimeSpan, ICollection(Of Int32))

    Creates a new instance of SqlAzureExecutionStrategy without a context.

    protected SqlAzureExecutionStrategy(int maxRetryCount, TimeSpan maxRetryDelay, ICollection<int> errorNumbersToAdd)Protected Sub New(maxRetryCount As Integer, maxRetryDelay As TimeSpan, errorNumbersToAdd As ICollection(Of Integer))

    Parameters

    • maxRetryCount
      System.Int32
      System.Int32

      The maximum number of retry attempts.

    • maxRetryDelay
      System.TimeSpan
      System.TimeSpan

      The maximum delay in milliseconds between retries.

    • errorNumbersToAdd
      System.Collections.Generic.ICollection<T><System.Int32>
      System.Collections.Generic.ICollection<T>(Of System.Int32)

      Additional SQL error numbers that should be considered transient.

Methods

  • 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

Details

Assembly

Microsoft.EntityFrameworkCore.SqlServer.dll