Open sandboxFocus

Class AspNetFrameworkRequestMetadata<T>

A base implementation of LogEventMetadata for legacy ASP.NET 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 AspNetFrameworkRequestMetadata, which exposes AspNetFrameworkRequestExpressionModel.

Inheritance
AspNetFrameworkRequestMetadata<T>
Namespace: PostSharp.Patterns.Diagnostics.Adapters.AspNetFramework
Assembly: PostSharp.Patterns.Diagnostics.Adapters.AspNetFramework.dll
Syntax
public abstract class AspNetFrameworkRequestMetadata<T> : LogEventMetadata<T>
Type Parameters
Name Description
T

The type of the expression model.

Constructors

Name Description
AspNetFrameworkRequestMetadata(string)

Initializes a new AspNetFrameworkRequestMetadata.

Methods

Name Description
HasInheritedProperty(object)

Determines if the current LogEventMetadata contains any inherited property. The implementation of this method must not allocate heap memory.

HasInheritedProperty(HttpContext)

Determines if a given HttpContext defines inherited properties. The default implementation returns true if the request has a Correlation-Context header.

VisitProperties<TVisitorState>(object, ILoggingPropertyVisitor<TVisitorState>, ref TVisitorState, in LoggingPropertyVisitorOptions)

Invokes an action for each property in the raw CLR object of a LogEventData.

VisitProperties<TVisitorState>(HttpContext, ILoggingPropertyVisitor<TVisitorState>, ref TVisitorState, in LoggingPropertyVisitorOptions)

Invokes the Visit<TValue>(string, TValue, in LoggingPropertyOptions, ref TState) method for all properties defined from a given HttpContext.

VisitProperty<TVisitorState, TValue>(string, TValue, ILoggingPropertyVisitor<TVisitorState>, ref TVisitorState, in LoggingPropertyOptions)

Called by VisitProperties<TVisitorState>(HttpContext, ILoggingPropertyVisitor<TVisitorState>, ref TVisitorState, in LoggingPropertyVisitorOptions) for each property. The default implementation filters out null or empty properties. You can override this method to change the default filtering.