PostSharp6.3/API Reference/Post­Sharp.​Patterns.​Diagnostics.​Contexts Namespace/Logging­Context Class/Logging­Context Methods/Logging­Context.​For­Each­Property Method/Logging­Context.​For­Each­Property Method (Logging­Property­Visitor(Object), Boolean)

LoggingContext.ForEachProperty Method (LoggingPropertyVisitor<Object>, Boolean)

Invokes a delegate for each property defined in the current logging context and optionally in its ancestor contexts.

Namespace:  PostSharp.Patterns.Diagnostics.Contexts
Assembly:  PostSharp.Patterns.Diagnostics (in PostSharp.Patterns.Diagnostics.dll) Version: 6.3.11.0 (6.3.11.0)
Syntax
C#
public void ForEachProperty(
	LoggingPropertyVisitor<Object> visitor,
	bool includeAncestors = true
)

Parameters

visitor
Type: PostSharp.Patterns.Diagnostics.Contexts.LoggingPropertyVisitor<Object>
The delegate to invoke. The state parameter of the delegate will be assigned to a dummy variable.
includeAncestors (Optional)
Type: System.Boolean
true if ancestor contexts should be visited, false if only the current context should be visited.

Implements

ILoggingContext.ForEachProperty(LoggingPropertyVisitor<Object>, Boolean)
Remarks

This method will visit all properties regardless of their name. If several properties have the same name, they will be visited several times.

See Also