PostSharp 6.10 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Diagnostics.​Adapters.​Asp­Net­Core Namespace / Asp­Net­Core­Request­Metadata(T) Class

AspNetCoreRequestMetadata<T> Class

A base implementation of LogEventMetadata for ASP.NET Core incoming HTTP requests. You can derive from this class if you want to expose your own expression model. The default implementation is the non-generic AspNetCoreRequestMetadata, which exposes AspNetCoreRequestExpressionModel.
Inheritance Hierarchy

Namespace:  PostSharp.Patterns.Diagnostics.Adapters.AspNetCore
Assembly:  PostSharp.Patterns.Diagnostics.Adapters.AspNetCore (in PostSharp.Patterns.Diagnostics.Adapters.AspNetCore.dll) Version: 6.10.14.0 (6.10.14.0)
Syntax
C#
public abstract class AspNetCoreRequestMetadata<T> : LogEventMetadata<T>

Type Parameters

T
The type of the expression model.

The AspNetCoreRequestMetadata<T> type exposes the following members.

Constructors
  NameDescription
Protected methodAspNetCoreRequestMetadata<T>
Initializes a new AspNetCoreRequestMetadata.
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.
(Inherited from LogEventMetadata<TExpressionModel>.)
Protected methodGetPropertyOptions
Gets the options of a given property.
(Inherited from LogEventMetadata.)
Protected methodHasInheritedProperty(HttpContext)
Determines if a given HttpContext defines inherited properties. The default implementation returns true if the request has a Correlation-Context header.
Public methodHasInheritedProperty(Object)
Determines if the current LogEventMetadata contains any inherited property. The implementation of this method must not allocate heap memory.
(Overrides LogEventMetadata.HasInheritedProperty(Object).)
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.
Public methodVisitProperties<TVisitorState>(Object, ILoggingPropertyVisitor<TVisitorState>, TVisitorState, LoggingPropertyVisitorOptions)
Invokes an action for each property in the raw CLR object of a LogEventData.
(Overrides LogEventMetadata.VisitProperties<TVisitorState>(Object, ILoggingPropertyVisitor<TVisitorState>, TVisitorState, LoggingPropertyVisitorOptions).)
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.
See Also