Open sandboxFocus

Struct OpenTransactionExpressionModel<T>

The type of the t parameters in the if and sample attributes of the transaction policy files.

Implements
Namespace: PostSharp.Patterns.Diagnostics.Transactions.Model
Assembly: PostSharp.Patterns.Diagnostics.Configuration.dll
Syntax
public readonly struct OpenTransactionExpressionModel<T> : IFormattable
Type Parameters
Name Description
T

The type of the model exposed by the request. See Request.

Remarks

The type attribute of the policy element determines T: AspNetCoreRequest and AspNetFrameworkRequest select the expression models of the ASP.NET adapters, and a custom transaction type selects the expression model that its metadata defines.

Properties

Name Description
IsParentSampled

Gets a value indicating whether the parent request was logged as a result of sampling. This means that a policy that had a sampling clause logged the parent request. It corresponds to the sampled flag of the W3C Trace Context specification (https://www.w3.org/TR/trace-context/#sampled-flag).

Kind

Gets the kind of activity.

Level

Gets the LogLevel with which the transaction was opened.

Request

Gets the model of the request that causes the transaction to be opened. The type depends on the kind of transaction. For ASP.NET Core, this property is of type AspNetCoreRequestExpressionModel, and for the legacy ASP.NET, it is AspNetFrameworkRequestExpressionModel.

See Also