PostSharp 6.9 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Diagnostics.​Transactions Namespace / ITransaction­Policy Interface / ITransaction­Policy Methods / ITransaction­Policy.​Evaluate­Extended­Close­Expression(T) Method

ITransactionPolicy.EvaluateExtendedCloseExpression<T> Method

Evaluates an expression defined as an extended property (typically an XML attribute) where the argument of the expression in an CloseTransactionExpressionModel.

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#
T EvaluateExtendedCloseExpression<T>(
	string propertyName,
	LoggingTransaction transaction,
	T defaultValue = null,
	ExtendedTransactionExpressionOptions options = ExtendedTransactionExpressionOptions.None
)

Parameters

propertyName
Type: System.String
Name of the property (or XML attribute) that defines the expression. Case sensitive.
transaction
Type: PostSharp.Patterns.Diagnostics.Transactions.LoggingTransaction
The input LoggingTransaction.
defaultValue (Optional)
Type: T
Value returned if the expression is not defined or has an error.
options (Optional)
Type: PostSharp.Patterns.Diagnostics.Transactions.ExtendedTransactionExpressionOptions
Determines whether exceptions should be thrown or swallowed or whether the expression is allowed to use sampling functions.

Type Parameters

T
Return type of the expression.

Return Value

Type: T
The result of the expression, or defaultValue.
See Also