CommitFailureHandler.PruneTransactionHistoryAsync 方法 (Boolean, Boolean, CancellationToken)
[此頁面專屬於 Entity Framework 第 6 版。最新版本可從 'Entity Framework' NuGet 套件取得。如需 Entity Framework 的詳細資訊,請參閱 msdn.com/data/ef。]
如果已標記要刪除的交易數目超過 PruningLimit,就移除這些交易。
命名空間: System.Data.Entity.Infrastructure
組件: EntityFramework (在 EntityFramework.dll 中)
語法
'宣告
<DebuggerStepThroughAttribute> _
Protected Overridable Function PruneTransactionHistoryAsync ( _
force As Boolean, _
useExecutionStrategy As Boolean, _
cancellationToken As CancellationToken _
) As Task
'用途
Dim force As Boolean
Dim useExecutionStrategy As Boolean
Dim cancellationToken As CancellationToken
Dim returnValue As Task
returnValue = Me.PruneTransactionHistoryAsync(force, _
useExecutionStrategy, cancellationToken)
[DebuggerStepThroughAttribute]
protected virtual Task PruneTransactionHistoryAsync(
bool force,
bool useExecutionStrategy,
CancellationToken cancellationToken
)
[DebuggerStepThroughAttribute]
protected:
virtual Task^ PruneTransactionHistoryAsync(
bool force,
bool useExecutionStrategy,
CancellationToken cancellationToken
)
[<DebuggerStepThroughAttribute>]
abstract PruneTransactionHistoryAsync :
force:bool *
useExecutionStrategy:bool *
cancellationToken:CancellationToken -> Task
[<DebuggerStepThroughAttribute>]
override PruneTransactionHistoryAsync :
force:bool *
useExecutionStrategy:bool *
cancellationToken:CancellationToken -> Task
protected function PruneTransactionHistoryAsync(
force : boolean,
useExecutionStrategy : boolean,
cancellationToken : CancellationToken
) : Task
參數
- force
類型:System.Boolean
true 表示即使舊交易數未超過 PruningLimit,仍會移除這些交易;否則為 false。
- useExecutionStrategy
類型:System.Boolean
true 表示使用關聯的執行策略來執行作業;否則為 false。
- cancellationToken
類型:System.Threading.CancellationToken
取消語彙基元。
傳回值
類型:System.Threading.Tasks.Task
表示非同步作業的工作。