示例#1
0
 /// <summary>
 /// Gets all messages on the stack.
 /// </summary>
 /// <returns>Array of strings on the stack.</returns>
 public static string[] GetAllMessages()
 {
     return(NestedDiagnosticsContext.GetAllMessages());
 }
示例#2
0
 /// <summary>
 /// Clears current thread NDC stack.
 /// </summary>
 public static void Clear()
 {
     NestedDiagnosticsContext.Clear();
 }
示例#3
0
 /// <summary>
 /// Pops the top object off the NDC stack. The object is removed from the stack.
 /// </summary>
 /// <returns>The top object from the NDC stack, if defined; otherwise <c>null</c>.</returns>
 public static object PopObject()
 {
     return(NestedDiagnosticsContext.PopObject());
 }
示例#4
0
 /// <summary>
 /// Pops the top message off the NDC stack.
 /// </summary>
 /// <returns>The top message which is no longer on the stack.</returns>
 public static string Pop()
 {
     return(NestedDiagnosticsContext.Pop());
 }
示例#5
0
 /// <summary>
 /// Pushes the specified text on current thread NDC.
 /// </summary>
 /// <param name="text">The text to be pushed.</param>
 /// <returns>An instance of the object that implements IDisposable that returns the stack to the previous level when IDisposable.Dispose() is called. To be used with C# using() statement.</returns>
 public static IDisposable Push(string text)
 {
     return(NestedDiagnosticsContext.Push(text));
 }
示例#6
0
 /// <summary>
 /// Gets all objects on the NDC stack. The objects are not removed from the stack.
 /// </summary>
 /// <returns>Array of objects on the stack.</returns>
 public static object[] GetAllObjects()
 {
     return(NestedDiagnosticsContext.GetAllObjects());
 }