PostSharpAPI ReferencePost­Sharp.​Patterns.​Diagnostics.​TransactionsITransaction­PolicyEvaluate­Extended­Close­Expression
Open sandboxFocus

Method EvaluateExtendedCloseExpression

EvaluateExtendedCloseExpression<T>(String, LoggingTransaction, T, ExtendedTransactionExpressionOptions)

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

T EvaluateExtendedCloseExpression<T>(string propertyName, LoggingTransaction transaction, T defaultValue = null, ExtendedTransactionExpressionOptions options)
Type Name Description
String propertyName

Name of the property (or XML attribute) that defines the expression. Case sensitive.

LoggingTransaction transaction

The input LoggingTransaction.

T defaultValue

Value returned if the expression is not defined or has an error.

ExtendedTransactionExpressionOptions options

Determines whether exceptions should be thrown or swallowed or whether the expression is allowed to use sampling functions.

Type Description

The result of the expression, or defaultValue.

Type Parameters
Name Description

Return type of the expression.