Click or drag to resize

NestedDiagnosticsContext Class

Note: This API is now obsolete.

Obsolete and replaced by ScopeContext with NLog v5. Nested Diagnostics Context (NDC) is a stack of nested values. Stores the stack in the thread-local static variable, and provides methods to output the values in layouts.
Inheritance Hierarchy
SystemObject
  NLogNestedDiagnosticsContext

Namespace:  NLog
Assembly:  NLog (in NLog.dll) Version: 5.3.1+cf6675da40ccfd4c8c526a3b2bdbeed3442910a1
Syntax
[ObsoleteAttribute("Replaced by ScopeContext.PushNestedState or Logger.PushScopeNested using ${scopenested}. Marked obsolete on NLog 5.0")]
public static class NestedDiagnosticsContext

The NestedDiagnosticsContext type exposes the following members.

Properties
  NameDescription
Public propertyStatic memberTopMessage Obsolete.
Gets the top NDC message but doesn't remove it.
Public propertyStatic memberTopObject Obsolete.
Gets the top NDC object but doesn't remove it.
Top
Methods
  NameDescription
Public methodStatic memberClear Obsolete.
Clears current thread NDC stack.
Public methodStatic memberGetAllMessages Obsolete.
Gets all messages on the stack.
Public methodStatic memberGetAllMessages(IFormatProvider) Obsolete.
Gets all messages from the stack, without removing them.
Public methodStatic memberGetAllObjects Obsolete.
Gets all objects on the stack.
Public methodStatic memberPeekObject Obsolete.
Peeks the first object on the NDC stack
Public methodStatic memberPop Obsolete.
Pops the top message off the NDC stack.
Public methodStatic memberPop(IFormatProvider) Obsolete.
Pops the top message from the NDC stack.
Public methodStatic memberPopObject Obsolete.
Pops the top object off the NDC stack.
Public methodStatic memberPush(Object) Obsolete.
Pushes the specified object on current thread NDC.
Public methodStatic memberPush(String) Obsolete.
Pushes the specified text on current thread NDC.
Top
See Also