PostSharp / / API Reference / Post­Sharp.​Patterns.​Diagnostics.​Transactions / ITransaction­Policy­Selector / Get­Policy
Open sandbox

Method GetPolicy

GetPolicy(in TransactionProperties, Boolean)

Gets the policy that determines whether an activity should be a logged transaction, and other details about the transaction.

ITransactionPolicy GetPolicy(in TransactionProperties properties, bool throwing = false)
Type Name Description
TransactionProperties properties

Properties, especially of the activity that's creating a transaction.

Boolean throwing

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.

Type Description

Policy to apply to the activity.