PostSharp 2023.0 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Diagnostics.​Transactions.​Model Namespace / Policy­Configuration­Model Class / Policy­Configuration­Model Properties / Policy­Configuration­Model.​If Property

PolicyConfigurationModel.If Property

A C# predicate mapping a parameter t to a bool that determines whether the current policy matches the transaction t. The type of t is OpenTransactionExpressionModel<T>, which is a generic type. The generic type argument, and the type of the Request property, depends on the type of transaction, i.e. on the Type attribute. When the transaction type is AspNetCoreRequest, the expression model type is AspNetCoreRequestExpressionModel. In case of custom transactions, the type is the value of the expression model specified in the LogEventMetadata. This expression can call Matches(String, String) to evaluate a regular expression.

Namespace:  PostSharp.Patterns.Diagnostics.Transactions.Model
Assembly:  PostSharp.Patterns.Diagnostics.Configuration (in PostSharp.Patterns.Diagnostics.Configuration.dll) Version: 2023.0.3.0 (2023.0.3.0)
public string If { get; }

Property Value

Type: String
See Also