PostSharp 2023.0 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Diagnostics.​Adapters.​Asp­Net­Framework Namespace / Asp­Net­Framework­Request­Metadata Class

AspNetFrameworkRequestMetadata Class

The default implementation of LogEventMetadata and incoming legacy ASP.NET requests. Exposes an AspNetFrameworkRequestExpressionModel to the policy configuration file.
Inheritance Hierarchy

Namespace:  PostSharp.Patterns.Diagnostics.Adapters.AspNetFramework
Assembly:  PostSharp.Patterns.Diagnostics.Adapters.AspNetFramework (in PostSharp.Patterns.Diagnostics.Adapters.AspNetFramework.dll) Version: 2023.0.3.0 (2023.0.3.0)
Syntax
C#
public class AspNetFrameworkRequestMetadata : AspNetFrameworkRequestMetadata<AspNetFrameworkRequestExpressionModel>

The AspNetFrameworkRequestMetadata type exposes the following members.

Constructors
  NameDescription
Public methodAspNetFrameworkRequestMetadata()
Initializes a new AspNetFrameworkRequestMetadata with the default name. You must not invoke this constructor if you are deriving the class.
Protected methodAspNetFrameworkRequestMetadata(String)
Initializes a new AspNetFrameworkRequestMetadata and specifies the name. Invoke this constructor if you are deriving the class.
Properties
  NameDescription
Public propertyName
Gets the name of the current LogEventMetadata. This property may be undefined. It must be defined when the LogEventData must be available for evaluation from transaction policy expressions. In this case, the type of expression model (i.e. the generic parameter of LogEventMetadata<TExpressionModel>) must be identical for identical values of the Name property.
(Inherited from LogEventMetadata.)
Methods
  NameDescription
Public methodGetExpressionModel
Gets the object that must be exposed to the expressions in transaction policies.
(Overrides LogEventMetadata<TExpressionModel>.GetExpressionModel(Object).)
Protected methodGetPropertyOptions
Gets the options of a given property.
(Inherited from LogEventMetadata.)
Public methodHasInheritedProperty(Object)
Determines if the current LogEventMetadata contains any inherited property. The implementation of this method must not allocate heap memory.
(Inherited from AspNetFrameworkRequestMetadata<T>.)
Protected methodHasInheritedProperty(HttpContext)
Determines if a given HttpContext defines inherited properties. The default implementation returns true if the request has a Correlation-Context header.
(Inherited from AspNetFrameworkRequestMetadata<T>.)
Public methodVisitProperties<TVisitorState>(Object, ILoggingPropertyVisitor<TVisitorState>, TVisitorState, LoggingPropertyVisitorOptions)
Invokes an action for each property in the raw CLR object of a LogEventData.
(Inherited from AspNetFrameworkRequestMetadata<T>.)
Protected methodVisitProperties<TVisitorState>(HttpContext, ILoggingPropertyVisitor<TVisitorState>, TVisitorState, LoggingPropertyVisitorOptions)
Invokes the Visit<TValue>(String, TValue, LoggingPropertyOptions, TState) method for all properties defined from a given HttpContext.
(Inherited from AspNetFrameworkRequestMetadata<T>.)
Public methodVisitProperties<TVisitorState>(Object, ILoggingPropertyVisitor<TVisitorState>, TVisitorState, LoggingPropertyVisitorOptions)
Invokes an action for each property in the raw CLR object of a LogEventData.
(Inherited from LogEventMetadata.)
Protected methodVisitProperty<TVisitorState, TValue>
Called by VisitProperties<TVisitorState>(HttpContext, ILoggingPropertyVisitor<TVisitorState>, TVisitorState, LoggingPropertyVisitorOptions) for each property. The default implementation filters out null or empty properties. You can override this method to change the default filtering.
(Inherited from AspNetFrameworkRequestMetadata<T>.)
See Also