Open sandboxFocus

Method VisitProperty

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.

Declaration
protected virtual void VisitProperty<TVisitorState, TValue>(string name, TValue value, ILoggingPropertyVisitor<TVisitorState> visitor, ref TVisitorState visitorState, in LoggingPropertyOptions options = default)
Parameters
Type Name Description
string name

Property name.

TValue value

Property value.

ILoggingPropertyVisitor<TVisitorState> visitor

The visitor whose Visit<TValue>(string, TValue, in LoggingPropertyOptions, ref TState) method is invoked.

TVisitorState visitorState

An opaque state passed to the visitor.

LoggingPropertyOptions options

Property options.

Type Parameters
Name Description
TVisitorState

The type of the opaque state passed to visitor.

TValue

The type of the property.