PostSharp 6.9 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Diagnostics.​Record­Builders Namespace / Log­Record­Builder Class / Log­Record­Builder Methods / Log­Record­Builder.​Visit­Properties Method / Log­Record­Builder.​Visit­Properties Method (Action(String, Object), Logging­Property­Visitor­Options)

LogRecordBuilder.VisitProperties Method (Action<String, Object>, LoggingPropertyVisitorOptions)

Invokes a delegate each property on the current log record. This offers a simple way to visit properties, but it has a performance overhead compared to VisitProperties<TState>(ILoggingPropertyVisitor<TState>, TState, LoggingPropertyVisitorOptions) because it is weakly typed and cause the allocation of a closure class to build the action. It also does not expose the LoggingPropertyOptions.

Namespace:  PostSharp.Patterns.Diagnostics.RecordBuilders
Assembly:  PostSharp.Patterns.Diagnostics (in PostSharp.Patterns.Diagnostics.dll) Version: 6.9.11.0 (6.9.11.0)
Syntax
C#
public void VisitProperties(
	Action<string, Object> action,
	 in LoggingPropertyVisitorOptions options = null
)

Parameters

action
Type: System.Action<String, Object>
The delegate to call for each property. The first value is the property name, the second its value.
options (Optional)
Type: PostSharp.Patterns.Diagnostics.Custom.LoggingPropertyVisitorOptions
Determines which properties are visited.
See Also