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


Type: System.String
Name of the property (or XML attribute) that defines the expression. Case sensitive.
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

Return type of the expression.

Return Value

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