Exemple #1
0
 /// <summary>
 /// Clears the content of current thread MDC.
 /// </summary>
 public static void Clear()
 {
     MappedDiagnosticsContext.Clear();
 }
Exemple #2
0
 /// <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);
 }
Exemple #3
0
 /// <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));
 }
Exemple #4
0
 /// <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));
 }
Exemple #5
0
 /// <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);
 }