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

ITransactionPolicySelector.GetPolicy Method

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

Namespace:  PostSharp.Patterns.Diagnostics.Transactions
Assembly:  PostSharp.Patterns.Diagnostics (in PostSharp.Patterns.Diagnostics.dll) Version: 6.9.11.0 (6.9.11.0)
Syntax
C#
ITransactionPolicy GetPolicy(
	 in TransactionProperties properties,
	bool throwing = false
)

Parameters

properties
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: ITransactionPolicy
Policy to apply to the activity.
Remarks
This method must ignore any sampling policy since they have already been evaluated by GetTransactionRequirement(TransactionProperties, Boolean).
See Also