PostSharpAPI ReferencePost­Sharp.​Patterns.​Diagnostics.​Adapters.​Asp­Net­CoreAsp­Net­Core­Request­Metadata<T>
Open sandboxFocus

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
System.Object
AspNetCoreRequestMetadata<T>
Namespace: PostSharp.Patterns.Diagnostics.Adapters.AspNetCore
Assembly: PostSharp.Patterns.Diagnostics.Adapters.AspNetCore.dll
Syntax
public abstract class AspNetCoreRequestMetadata<T> : LogEventMetadata<T>
Type Parameters
Name Description
T

The type of the expression model.

Constructors

Name Description
AspNetCoreRequestMetadata(String)

Initializes a new AspNetCoreRequestMetadata.

Methods

Name Description
HasInheritedProperty(HttpContext)

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

HasInheritedProperty(Object)

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

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 Microsoft.AspNetCore.Http.HttpContext.

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

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

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.