PostSharp 6.10 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Diagnostics.​Adapters.​Asp­Net­Core Namespace / Asp­Net­Core­Request­Expression­Model Structure

AspNetCoreRequestExpressionModel Structure

Exposes an ASP.NET Core request to the transaction policy expressions (see OpenTransactionExpressionModel.Request and CloseTransactionExpressionModel.Request). The type attribute of the policy element must be set to AspNetCoreRequest to match requests of this class.

Namespace:  PostSharp.Patterns.Diagnostics.Adapters.AspNetCore
Assembly:  PostSharp.Patterns.Diagnostics.Adapters.AspNetCore (in PostSharp.Patterns.Diagnostics.Adapters.AspNetCore.dll) Version: (
public readonly struct AspNetCoreRequestExpressionModel : IFormattable

The AspNetCoreRequestExpressionModel type exposes the following members.

Public propertyContext
Gets the full HttpContext object.
Public propertyMethod
Gets the HTTP method (such as GET).
Public propertyPath
Gets the path of the URL, starting with a /.
Public propertyProtocol
Gets the request protocol (such HTTP/1.1).
Public propertyQueryString
Gets the query string starting with a ?, or null.
Public propertyRemoteIpAddress
Gets the IP address of the remote client.
Public propertyScheme
Gets the request scheme, for instance http or https.
Public propertyUser
Gets the name of the current authenticated user, or null.
Public methodGetHeader
Gets a specified header, or null.
See Also