PostSharpAPI ReferencePost­Sharp.​Patterns.​Diagnostics.​TransactionsITransaction­Policy­SelectorGet­Policy
Open sandboxFocus

ITransactionPolicySelector.GetPolicy Method

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.


This method must ignore any sampling policy since they have already been evaluated by GetTransactionRequirement(in TransactionProperties, Boolean).