Beispiel #1
0
 /// <summary>
 ///     Clears the content of the GDC.
 /// </summary>
 public static void Clear()
 {
     GlobalDiagnosticsContext.Clear();
 }
Beispiel #2
0
 /// <summary>
 ///     Removes the specified item from the Global Diagnostics Context.
 /// </summary>
 /// <param name="item">Item name.</param>
 public static void Remove(string item)
 {
     GlobalDiagnosticsContext.Remove(item);
 }
Beispiel #3
0
 /// <summary>
 ///     Gets the Global Diagnostics Context named item.
 /// </summary>
 /// <param name="item">Item name.</param>
 /// <returns>The item value of string.Empty if the value is not present.</returns>
 public static string Get(string item)
 {
     return(GlobalDiagnosticsContext.Get(item));
 }
Beispiel #4
0
 /// <summary>
 ///     Checks whether the specified item exists in the Global Diagnostics Context.
 /// </summary>
 /// <param name="item">Item name.</param>
 /// <returns>A boolean indicating whether the specified item exists in current thread GDC.</returns>
 public static bool Contains(string item)
 {
     return(GlobalDiagnosticsContext.Contains(item));
 }
Beispiel #5
0
 /// <summary>
 ///     Sets the Global Diagnostics Context 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)
 {
     GlobalDiagnosticsContext.Set(item, value);
 }