ExecutionStrategyExtensions.Execute 方法

定义

重载

Execute(IExecutionStrategy, Action)

执行指定的操作。

Execute<TResult>(IExecutionStrategy, Func<TResult>)

执行指定的操作并返回结果。

Execute<TState,TResult>(IExecutionStrategy, Func<TState,TResult>, TState)

执行指定的操作并返回结果。

Execute<TState,TResult>(IExecutionStrategy, TState, Func<TState,TResult>)

执行指定的操作并返回结果。

Execute<TState,TResult>(IExecutionStrategy, Func<TState,TResult>, Func<TState,ExecutionResult<TResult>>, TState)
已过时.

执行指定的操作并返回结果。

Execute<TState,TResult>(IExecutionStrategy, TState, Func<TState,TResult>, Func<TState,ExecutionResult<TResult>>)

执行指定的操作并返回结果。

Execute<TState>(IExecutionStrategy, Action<TState>, TState)

执行指定的操作。

Execute<TState>(IExecutionStrategy, TState, Action<TState>)

执行指定的操作。

Execute(IExecutionStrategy, Action)

Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs

执行指定的操作。

public static void Execute (this Microsoft.EntityFrameworkCore.Storage.IExecutionStrategy strategy, Action operation);
static member Execute : Microsoft.EntityFrameworkCore.Storage.IExecutionStrategy * Action -> unit
<Extension()>
Public Sub Execute (strategy As IExecutionStrategy, operation As Action)

参数

strategy
IExecutionStrategy

将用于执行的策略。

operation
Action

表示不返回任何结果的可执行操作的委托。

注解

有关详细信息和示例,请参阅 连接复原能力和数据库重试

适用于

Execute<TResult>(IExecutionStrategy, Func<TResult>)

Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs

执行指定的操作并返回结果。

public static TResult Execute<TResult> (this Microsoft.EntityFrameworkCore.Storage.IExecutionStrategy strategy, Func<TResult> operation);
static member Execute : Microsoft.EntityFrameworkCore.Storage.IExecutionStrategy * Func<'Result> -> 'Result
<Extension()>
Public Function Execute(Of TResult) (strategy As IExecutionStrategy, operation As Func(Of TResult)) As TResult

类型参数

TResult

operation返回类型。

参数

strategy
IExecutionStrategy

将用于执行的策略。

operation
Func<TResult>

表示可执行操作的委托,该操作返回类型 TResult的结果。

返回

TResult

操作的结果。

注解

有关详细信息和示例,请参阅 连接复原能力和数据库重试

适用于

Execute<TState,TResult>(IExecutionStrategy, Func<TState,TResult>, TState)

执行指定的操作并返回结果。

public static TResult Execute<TState,TResult> (this Microsoft.EntityFrameworkCore.Storage.IExecutionStrategy strategy, Func<TState,TResult> operation, TState state);
static member Execute : Microsoft.EntityFrameworkCore.Storage.IExecutionStrategy * Func<'State, 'Result> * 'State -> 'Result
<Extension()>
Public Function Execute(Of TState, TResult) (strategy As IExecutionStrategy, operation As Func(Of TState, TResult), state As TState) As TResult

类型参数

TState

状态的类型。

TResult

operation返回类型。

参数

strategy
IExecutionStrategy

将用于执行的策略。

operation
Func<TState,TResult>

表示可执行操作的委托,该操作返回类型 TResult的结果。

state
TState

将传递给操作的状态。

返回

TResult

操作的结果。

适用于

Execute<TState,TResult>(IExecutionStrategy, TState, Func<TState,TResult>)

Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs

执行指定的操作并返回结果。

public static TResult Execute<TState,TResult> (this Microsoft.EntityFrameworkCore.Storage.IExecutionStrategy strategy, TState state, Func<TState,TResult> operation);
static member Execute : Microsoft.EntityFrameworkCore.Storage.IExecutionStrategy * 'State * Func<'State, 'Result> -> 'Result
<Extension()>
Public Function Execute(Of TState, TResult) (strategy As IExecutionStrategy, state As TState, operation As Func(Of TState, TResult)) As TResult

类型参数

TState

状态的类型。

TResult

operation返回类型。

参数

strategy
IExecutionStrategy

将用于执行的策略。

state
TState

将传递给操作的状态。

operation
Func<TState,TResult>

表示可执行操作的委托,该操作返回类型 TResult的结果。

返回

TResult

操作的结果。

注解

有关详细信息和示例,请参阅 连接复原能力和数据库重试

适用于

Execute<TState,TResult>(IExecutionStrategy, Func<TState,TResult>, Func<TState,ExecutionResult<TResult>>, TState)

Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs

注意

Use overload that takes the state first

执行指定的操作并返回结果。

public static TResult Execute<TState,TResult> (this Microsoft.EntityFrameworkCore.Storage.IExecutionStrategy strategy, Func<TState,TResult> operation, Func<TState,Microsoft.EntityFrameworkCore.Storage.ExecutionResult<TResult>> verifySucceeded, TState state);
[System.Obsolete("Use overload that takes the state first")]
public static TResult Execute<TState,TResult> (this Microsoft.EntityFrameworkCore.Storage.IExecutionStrategy strategy, Func<TState,TResult> operation, Func<TState,Microsoft.EntityFrameworkCore.Storage.ExecutionResult<TResult>> verifySucceeded, TState state);
static member Execute : Microsoft.EntityFrameworkCore.Storage.IExecutionStrategy * Func<'State, 'Result> * Func<'State, Microsoft.EntityFrameworkCore.Storage.ExecutionResult<'Result>> * 'State -> 'Result
[<System.Obsolete("Use overload that takes the state first")>]
static member Execute : Microsoft.EntityFrameworkCore.Storage.IExecutionStrategy * Func<'State, 'Result> * Func<'State, Microsoft.EntityFrameworkCore.Storage.ExecutionResult<'Result>> * 'State -> 'Result
<Extension()>
Public Function Execute(Of TState, TResult) (strategy As IExecutionStrategy, operation As Func(Of TState, TResult), verifySucceeded As Func(Of TState, ExecutionResult(Of TResult)), state As TState) As TResult

类型参数

TState

状态的类型。

TResult

operation返回类型。

参数

strategy
IExecutionStrategy

将用于执行的策略。

operation
Func<TState,TResult>

表示可执行操作的委托,该操作返回类型 TResult的结果。

verifySucceeded
Func<TState,ExecutionResult<TResult>>

一个委托,它测试操作是否成功,即使引发了异常。

state
TState

将传递给操作的状态。

返回

TResult

操作的结果。

属性

例外

在配置的重试次数后,操作未成功。

适用于

Execute<TState,TResult>(IExecutionStrategy, TState, Func<TState,TResult>, Func<TState,ExecutionResult<TResult>>)

Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs

执行指定的操作并返回结果。

public static TResult Execute<TState,TResult> (this Microsoft.EntityFrameworkCore.Storage.IExecutionStrategy strategy, TState state, Func<TState,TResult> operation, Func<TState,Microsoft.EntityFrameworkCore.Storage.ExecutionResult<TResult>> verifySucceeded);
public static TResult Execute<TState,TResult> (this Microsoft.EntityFrameworkCore.Storage.IExecutionStrategy strategy, TState state, Func<TState,TResult> operation, Func<TState,Microsoft.EntityFrameworkCore.Storage.ExecutionResult<TResult>>? verifySucceeded);
static member Execute : Microsoft.EntityFrameworkCore.Storage.IExecutionStrategy * 'State * Func<'State, 'Result> * Func<'State, Microsoft.EntityFrameworkCore.Storage.ExecutionResult<'Result>> -> 'Result
<Extension()>
Public Function Execute(Of TState, TResult) (strategy As IExecutionStrategy, state As TState, operation As Func(Of TState, TResult), verifySucceeded As Func(Of TState, ExecutionResult(Of TResult))) As TResult

类型参数

TState

状态的类型。

TResult

operation返回类型。

参数

strategy
IExecutionStrategy

将用于执行的策略。

state
TState

将传递给操作的状态。

operation
Func<TState,TResult>

表示可执行操作的委托,该操作返回类型 TResult的结果。

verifySucceeded
Func<TState,ExecutionResult<TResult>>

一个委托,它测试操作是否成功,即使引发了异常。

返回

TResult

操作的结果。

例外

在配置的重试次数后,操作未成功。

注解

有关详细信息和示例,请参阅 连接复原能力和数据库重试

适用于

Execute<TState>(IExecutionStrategy, Action<TState>, TState)

执行指定的操作。

public static void Execute<TState> (this Microsoft.EntityFrameworkCore.Storage.IExecutionStrategy strategy, Action<TState> operation, TState state);
static member Execute : Microsoft.EntityFrameworkCore.Storage.IExecutionStrategy * Action<'State> * 'State -> unit
<Extension()>
Public Sub Execute(Of TState) (strategy As IExecutionStrategy, operation As Action(Of TState), state As TState)

类型参数

TState

状态的类型。

参数

strategy
IExecutionStrategy

将用于执行的策略。

operation
Action<TState>

表示不返回任何结果的可执行操作的委托。

state
TState

将传递给操作的状态。

适用于

Execute<TState>(IExecutionStrategy, TState, Action<TState>)

Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs
Source:
ExecutionStrategyExtensions.cs

执行指定的操作。

public static void Execute<TState> (this Microsoft.EntityFrameworkCore.Storage.IExecutionStrategy strategy, TState state, Action<TState> operation);
static member Execute : Microsoft.EntityFrameworkCore.Storage.IExecutionStrategy * 'State * Action<'State> -> unit
<Extension()>
Public Sub Execute(Of TState) (strategy As IExecutionStrategy, state As TState, operation As Action(Of TState))

类型参数

TState

状态的类型。

参数

strategy
IExecutionStrategy

将用于执行的策略。

state
TState

将传递给操作的状态。

operation
Action<TState>

表示不返回任何结果的可执行操作的委托。

注解

有关详细信息和示例,请参阅 连接复原能力和数据库重试

适用于