SqlServerRetryingExecutionStrategy 构造函数

定义

重载

SqlServerRetryingExecutionStrategy(DbContext)

创建 SqlServerRetryingExecutionStrategy 的新实例。

SqlServerRetryingExecutionStrategy(ExecutionStrategyContext)

创建 SqlServerRetryingExecutionStrategy 的新实例。

SqlServerRetryingExecutionStrategy(ExecutionStrategyDependencies)

创建 SqlServerRetryingExecutionStrategy 的新实例。

SqlServerRetryingExecutionStrategy(DbContext, Int32)

创建 SqlServerRetryingExecutionStrategy 的新实例。

SqlServerRetryingExecutionStrategy(ExecutionStrategyContext, Int32)

创建 SqlServerRetryingExecutionStrategy 的新实例。

SqlServerRetryingExecutionStrategy(ExecutionStrategyDependencies, IEnumerable<Int32>)

创建 SqlServerRetryingExecutionStrategy 的新实例。

SqlServerRetryingExecutionStrategy(ExecutionStrategyDependencies, Int32)

创建 SqlServerRetryingExecutionStrategy 的新实例。

SqlServerRetryingExecutionStrategy(DbContext, Int32, TimeSpan, ICollection<Int32>)

创建 SqlServerRetryingExecutionStrategy 的新实例。

SqlServerRetryingExecutionStrategy(DbContext, Int32, TimeSpan, IEnumerable<Int32>)

创建 SqlServerRetryingExecutionStrategy 的新实例。

SqlServerRetryingExecutionStrategy(ExecutionStrategyContext, Int32, TimeSpan, ICollection<Int32>)

创建 SqlServerRetryingExecutionStrategy 的新实例。

SqlServerRetryingExecutionStrategy(ExecutionStrategyDependencies, Int32, TimeSpan, ICollection<Int32>)

创建 SqlServerRetryingExecutionStrategy 的新实例。

SqlServerRetryingExecutionStrategy(ExecutionStrategyDependencies, Int32, TimeSpan, IEnumerable<Int32>)

创建 SqlServerRetryingExecutionStrategy 的新实例。

SqlServerRetryingExecutionStrategy(DbContext)

创建 SqlServerRetryingExecutionStrategy 的新实例。

public SqlServerRetryingExecutionStrategy (Microsoft.EntityFrameworkCore.DbContext context);
new Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy : Microsoft.EntityFrameworkCore.DbContext -> Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy
Public Sub New (context As DbContext)

参数

context
DbContext

将对其调用操作的上下文。

注解

对于最大重试计数,默认值为 6,对于最大默认延迟,则使用 30 秒。

适用于

SqlServerRetryingExecutionStrategy(ExecutionStrategyContext)

创建 SqlServerRetryingExecutionStrategy 的新实例。

public SqlServerRetryingExecutionStrategy (Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyContext context);
new Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy : Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyContext -> Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy
Public Sub New (context As ExecutionStrategyContext)

参数

context
ExecutionStrategyContext

所需的依赖项。

适用于

SqlServerRetryingExecutionStrategy(ExecutionStrategyDependencies)

创建 SqlServerRetryingExecutionStrategy 的新实例。

public SqlServerRetryingExecutionStrategy (Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyDependencies dependencies);
new Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy : Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyDependencies -> Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy
Public Sub New (dependencies As ExecutionStrategyDependencies)

参数

dependencies
ExecutionStrategyDependencies

包含服务依赖项的参数对象。

注解

对于最大重试计数,默认值为 6,对于最大默认延迟,则使用 30 秒。

适用于

SqlServerRetryingExecutionStrategy(DbContext, Int32)

创建 SqlServerRetryingExecutionStrategy 的新实例。

public SqlServerRetryingExecutionStrategy (Microsoft.EntityFrameworkCore.DbContext context, int maxRetryCount);
new Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy : Microsoft.EntityFrameworkCore.DbContext * int -> Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy
Public Sub New (context As DbContext, maxRetryCount As Integer)

参数

context
DbContext

将对其调用操作的上下文。

maxRetryCount
Int32

最大重试尝试次数。

注解

使用默认值 30 秒表示最大默认延迟。

适用于

SqlServerRetryingExecutionStrategy(ExecutionStrategyContext, Int32)

创建 SqlServerRetryingExecutionStrategy 的新实例。

public SqlServerRetryingExecutionStrategy (Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyContext context, int maxRetryCount);
new Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy : Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyContext * int -> Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy
Public Sub New (context As ExecutionStrategyContext, maxRetryCount As Integer)

参数

context
ExecutionStrategyContext

所需的依赖项。

maxRetryCount
Int32

最大重试尝试次数。

适用于

SqlServerRetryingExecutionStrategy(ExecutionStrategyDependencies, IEnumerable<Int32>)

创建 SqlServerRetryingExecutionStrategy 的新实例。

public SqlServerRetryingExecutionStrategy (Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyDependencies dependencies, System.Collections.Generic.IEnumerable<int> errorNumbersToAdd);
new Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy : Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyDependencies * seq<int> -> Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy
Public Sub New (dependencies As ExecutionStrategyDependencies, errorNumbersToAdd As IEnumerable(Of Integer))

参数

dependencies
ExecutionStrategyDependencies

包含服务依赖项的参数对象。

errorNumbersToAdd
IEnumerable<Int32>

其他应被视为暂时性的 SQL 错误号。

注解

对于最大重试计数,默认值为 6,对于最大默认延迟,则使用 30 秒。

适用于

SqlServerRetryingExecutionStrategy(ExecutionStrategyDependencies, Int32)

创建 SqlServerRetryingExecutionStrategy 的新实例。

public SqlServerRetryingExecutionStrategy (Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyDependencies dependencies, int maxRetryCount);
new Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy : Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyDependencies * int -> Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy
Public Sub New (dependencies As ExecutionStrategyDependencies, maxRetryCount As Integer)

参数

dependencies
ExecutionStrategyDependencies

包含服务依赖项的参数对象。

maxRetryCount
Int32

最大重试尝试次数。

注解

使用默认值 30 秒表示最大默认延迟。

适用于

SqlServerRetryingExecutionStrategy(DbContext, Int32, TimeSpan, ICollection<Int32>)

创建 SqlServerRetryingExecutionStrategy 的新实例。

public SqlServerRetryingExecutionStrategy (Microsoft.EntityFrameworkCore.DbContext context, int maxRetryCount, TimeSpan maxRetryDelay, System.Collections.Generic.ICollection<int> errorNumbersToAdd);
public SqlServerRetryingExecutionStrategy (Microsoft.EntityFrameworkCore.DbContext context, int maxRetryCount, TimeSpan maxRetryDelay, System.Collections.Generic.ICollection<int>? errorNumbersToAdd);
new Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy : Microsoft.EntityFrameworkCore.DbContext * int * TimeSpan * System.Collections.Generic.ICollection<int> -> Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy
Public Sub New (context As DbContext, maxRetryCount As Integer, maxRetryDelay As TimeSpan, errorNumbersToAdd As ICollection(Of Integer))

参数

context
DbContext

将对其调用操作的上下文。

maxRetryCount
Int32

最大重试尝试次数。

maxRetryDelay
TimeSpan

重试之间的最大延迟。

errorNumbersToAdd
ICollection<Int32>

其他应被视为暂时性的 SQL 错误号。

适用于

SqlServerRetryingExecutionStrategy(DbContext, Int32, TimeSpan, IEnumerable<Int32>)

创建 SqlServerRetryingExecutionStrategy 的新实例。

public SqlServerRetryingExecutionStrategy (Microsoft.EntityFrameworkCore.DbContext context, int maxRetryCount, TimeSpan maxRetryDelay, System.Collections.Generic.IEnumerable<int>? errorNumbersToAdd);
new Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy : Microsoft.EntityFrameworkCore.DbContext * int * TimeSpan * seq<int> -> Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy
Public Sub New (context As DbContext, maxRetryCount As Integer, maxRetryDelay As TimeSpan, errorNumbersToAdd As IEnumerable(Of Integer))

参数

context
DbContext

将对其调用操作的上下文。

maxRetryCount
Int32

最大重试尝试次数。

maxRetryDelay
TimeSpan

重试之间的最大延迟。

errorNumbersToAdd
IEnumerable<Int32>

其他应被视为暂时性的 SQL 错误号。

适用于

SqlServerRetryingExecutionStrategy(ExecutionStrategyContext, Int32, TimeSpan, ICollection<Int32>)

创建 SqlServerRetryingExecutionStrategy 的新实例。

public SqlServerRetryingExecutionStrategy (Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyContext context, int maxRetryCount, TimeSpan maxRetryDelay, System.Collections.Generic.ICollection<int> errorNumbersToAdd);
new Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy : Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyContext * int * TimeSpan * System.Collections.Generic.ICollection<int> -> Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy
Public Sub New (context As ExecutionStrategyContext, maxRetryCount As Integer, maxRetryDelay As TimeSpan, errorNumbersToAdd As ICollection(Of Integer))

参数

context
ExecutionStrategyContext

所需的依赖项。

maxRetryCount
Int32

最大重试尝试次数。

maxRetryDelay
TimeSpan

重试之间的最大延迟(以毫秒为单位)。

errorNumbersToAdd
ICollection<Int32>

其他应被视为暂时性的 SQL 错误号。

适用于

SqlServerRetryingExecutionStrategy(ExecutionStrategyDependencies, Int32, TimeSpan, ICollection<Int32>)

创建 SqlServerRetryingExecutionStrategy 的新实例。

public SqlServerRetryingExecutionStrategy (Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyDependencies dependencies, int maxRetryCount, TimeSpan maxRetryDelay, System.Collections.Generic.ICollection<int> errorNumbersToAdd);
public SqlServerRetryingExecutionStrategy (Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyDependencies dependencies, int maxRetryCount, TimeSpan maxRetryDelay, System.Collections.Generic.ICollection<int>? errorNumbersToAdd);
new Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy : Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyDependencies * int * TimeSpan * System.Collections.Generic.ICollection<int> -> Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy
Public Sub New (dependencies As ExecutionStrategyDependencies, maxRetryCount As Integer, maxRetryDelay As TimeSpan, errorNumbersToAdd As ICollection(Of Integer))

参数

dependencies
ExecutionStrategyDependencies

包含服务依赖项的参数对象。

maxRetryCount
Int32

最大重试尝试次数。

maxRetryDelay
TimeSpan

重试之间的最大延迟。

errorNumbersToAdd
ICollection<Int32>

其他应被视为暂时性的 SQL 错误号。

适用于

SqlServerRetryingExecutionStrategy(ExecutionStrategyDependencies, Int32, TimeSpan, IEnumerable<Int32>)

创建 SqlServerRetryingExecutionStrategy 的新实例。

public SqlServerRetryingExecutionStrategy (Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyDependencies dependencies, int maxRetryCount, TimeSpan maxRetryDelay, System.Collections.Generic.IEnumerable<int>? errorNumbersToAdd);
new Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy : Microsoft.EntityFrameworkCore.Storage.ExecutionStrategyDependencies * int * TimeSpan * seq<int> -> Microsoft.EntityFrameworkCore.SqlServerRetryingExecutionStrategy
Public Sub New (dependencies As ExecutionStrategyDependencies, maxRetryCount As Integer, maxRetryDelay As TimeSpan, errorNumbersToAdd As IEnumerable(Of Integer))

参数

dependencies
ExecutionStrategyDependencies

包含服务依赖项的参数对象。

maxRetryCount
Int32

最大重试尝试次数。

maxRetryDelay
TimeSpan

重试之间的最大延迟。

errorNumbersToAdd
IEnumerable<Int32>

其他应被视为暂时性的 SQL 错误号。

适用于