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)
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: TThe result of the expression, or defaultValue.