PostSharp 2023.0 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Diagnostics.​Transactions Namespace / ITransaction­Policy­Selector Interface / ITransaction­Policy­Selector Methods / ITransaction­Policy­Selector.​Get­Transaction­Requirement Method

ITransactionPolicySelector.GetTransactionRequirement Method

Determines whether an activity should result in opening a transaction.

Namespace:  PostSharp.Patterns.Diagnostics.Transactions
Assembly:  PostSharp.Patterns.Diagnostics (in PostSharp.Patterns.Diagnostics.dll) Version: 2023.0.3.0 (2023.0.3.0)
TransactionRequirement GetTransactionRequirement(
	 in TransactionProperties properties,
	bool throwing = false


Type: PostSharp.Patterns.Diagnostics.Transactions.TransactionPropertiesInAttribute
Properties, especially of the activity that's creating a transaction.
throwing (Optional)
Type: System.Boolean
true if errors should be reported as exceptions, false if they should be handled without exception. The default is false. The true value is used for debugging and diagnostics.

Return Value

Type: TransactionRequirement
Policy to apply to the activity.

Return Value

Type: TransactionRequirement
This method must apply sampling policies, if any.
See Also