TransactionScopeOption 列舉
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
提供建立交易範圍的其他選項。
public enum class TransactionScopeOption
C#
public enum TransactionScopeOption
type TransactionScopeOption =
Public Enum TransactionScopeOption
- 繼承
名稱 | 值 | Description |
---|---|---|
Required | 0 | 交易為範圍所需。 如果已經存在環境交易,則會使用環境交易, 否則會在進入範圍前建立新的交易。 這是預設值。 |
RequiresNew | 1 | 一定會建立該範圍的新交易。 |
Suppress | 2 | 當建立範圍時,會隱藏環境交易內容, 範圍內的所有作業都是在不使用環境交易內容的情況下完成。 |
列舉 TransactionScopeOption 會傳遞至 類別的各種 TransactionScope 建構函式,以定義範圍的交易行為。 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.
產品 | 版本 |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10 |
.NET Framework | 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |