ForEachProperty(LoggingPropertyVisitor<object>, bool)
Invokes a delegate for each property defined in the current logging context and optionally in its ancestor contexts.
Declaration
[Obsolete("Use LoggingContext.VisitProperties.")]
void ForEachProperty(LoggingPropertyVisitor<object> visitor, bool includeAncestors = true)
Parameters
Type | Name | Description |
---|---|---|
LoggingPropertyVisitor<object> | visitor | The delegate to invoke. The |
bool | includeAncestors |
|
Remarks
This method will visit all properties regardless of their name. If several properties have the same name, they will be visited several times.
ForEachProperty<T>(LoggingPropertyVisitor<T>, ref T, bool)
Invokes a delegate for each property defined in the current logging context and optionally in its ancestor contexts, and specifies passes a state object to the delegate.
Declaration
[Obsolete("Use LoggingContext.VisitProperties.")]
void ForEachProperty<T>(LoggingPropertyVisitor<T> visitor, ref T state, bool includeAncestors = true)
Parameters
Type | Name | Description |
---|---|---|
LoggingPropertyVisitor<T> | visitor | The delegate to invoke. The |
T | state | Some state that will be passed to the |
bool | includeAncestors |
|
Type Parameters
Name | Description |
---|---|
T | Type of the state passed to the |
Remarks
This method will visit all properties regardless of their name. If several properties have the same name, they will be visited several times.