TransactionScopeOption TransactionScopeOption TransactionScopeOption TransactionScopeOption Enum

定義

提供建立交易範圍的其他選項。 Provides additional options for creating a transaction scope.

public enum class TransactionScopeOption
public enum TransactionScopeOption
type TransactionScopeOption = 
Public Enum TransactionScopeOption
繼承
TransactionScopeOptionTransactionScopeOptionTransactionScopeOptionTransactionScopeOption

欄位

Required Required Required Required 0

交易為範圍所需。 A transaction is required by the scope. 如果已經存在環境交易,則會使用環境交易, It uses an ambient transaction if one already exists. 否則會在進入範圍前建立新的交易。 Otherwise, it creates a new transaction before entering the scope. 這是預設值。 This is the default value.

RequiresNew RequiresNew RequiresNew RequiresNew 1

一定會建立該範圍的新交易。 A new transaction is always created for the scope.

Suppress Suppress Suppress Suppress 2

當建立範圍時,會隱藏環境交易內容, The ambient transaction context is suppressed when creating the scope. 範圍內的所有作業都是在不使用環境交易內容的情況下完成。 All operations within the scope are done without an ambient transaction context.

備註

TransactionScopeOption列舉會傳遞至各種建構函式的TransactionScope類別來定義範圍的交易行為。The TransactionScopeOption enumeration is passed to the various constructors of the TransactionScope class to define the transactional behavior of the scope. 如需有關如何使用這個列舉的詳細資訊,請參閱 「 使用 TransactionScopeOption 管理交易流程 」 一節實作隱含異動使用異動範圍For more information on how this enumeration is used, see the "Managing Transaction Flow using TransactionScopeOption" section in Implementing An Implicit Transaction Using Transaction Scope.

適用於