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: 2023.0.3.0 (2023.0.3.0)
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.