/// <summary> /// Clears the content of current thread MDC. /// </summary> public static void Clear() { MappedDiagnosticsContext.Clear(); }
/// <summary> /// Removes the specified item from current thread MDC. /// </summary> /// <param name="item">Item name.</param> public static void Remove(string item) { MappedDiagnosticsContext.Remove(item); }
/// <summary> /// Gets the current thread MDC named item. /// </summary> /// <param name="item">Item name.</param> /// <returns>The value of <paramref name="item"/>, if defined; otherwise <c>null</c>.</returns> public static object GetObject(string item) { return(MappedDiagnosticsContext.GetObject(item)); }
/// <summary> /// Checks whether the specified item exists in current thread MDC. /// </summary> /// <param name="item">Item name.</param> /// <returns>A boolean indicating whether the specified item exists in current thread MDC.</returns> public static bool Contains(string item) { return(MappedDiagnosticsContext.Contains(item)); }
/// <summary> /// Sets the current thread MDC item to the specified value. /// </summary> /// <param name="item">Item name.</param> /// <param name="value">Item value.</param> public static void Set(string item, string value) { MappedDiagnosticsContext.Set(item, value); }