<PackageReference Include="NLog" Version="6.1.1" />

NLog.GlobalDiagnosticsContext

public static class GlobalDiagnosticsContext
Global Diagnostics Context - a dictionary structure to hold per-application-instance values.
public static void Clear()

Clears the content of the Global Diagnostics Context (GDC) dictionary.

public static bool Contains(string item)

Determines whether the Global Diagnostics Context (GDC) dictionary contains the specified key.

public static string Get(string item)

Gets the value with the specified key in the Global Diagnostics Context (GDC) dictionary

public static string Get(string item, IFormatProvider formatProvider)

Gets the value with the specified key in the Global Diagnostics Context (GDC) dictionary

public static ICollection<string> GetNames()

Gets all key-names from Global Diagnostics Context (GDC) dictionary

public static object GetObject(string item)

Gets the value with the specified key in the Global Diagnostics Context (GDC) dictionary

public static void Remove(string item)

Removes the value with the specified key from the Global Diagnostics Context (GDC) dictionary

public static void Set(string item, string value)

Sets the value with the specified key in the Global Diagnostics Context (GDC) dictionary

public static void Set(string item, object value)

Sets the value with the specified key in the Global Diagnostics Context (GDC) dictionary