Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

TransactionScope Constructor (TransactionScopeOption, TimeSpan, TransactionScopeAsyncFlowOption)

[Supported in the .NET Framework 4.5.1 and later versions]

Initializes a new instance of the TransactionScope class with the specified timeout value, requirements, and asynchronous flow option.

Namespace:  System.Transactions
Assembly:  System.Transactions (in System.Transactions.dll)

public TransactionScope(
	TransactionScopeOption scopeOption,
	TimeSpan scopeTimeout,
	TransactionScopeAsyncFlowOption asyncFlowOption
)

Parameters

scopeOption
Type: System.Transactions.TransactionScopeOption

An instance of the TransactionScopeOption enumeration that describes the transaction requirements associated with this transaction scope.

scopeTimeout
Type: System.TimeSpan

The TimeSpan after which the transaction scope times out and aborts the transaction.

asyncFlowOption
Type: System.Transactions.TransactionScopeAsyncFlowOption

An instance of the TransactionScopeAsyncFlowOption enumeration that describes whether the ambient transaction associated with the transaction scope will flow across thread continuations when using Task or async/await .NET async programming patterns.

.NET Framework

Supported in: 4.6, 4.5.1
Show:
© 2015 Microsoft