mscorlib(4.0.0.0) API with additions
|
Provides a set of methods and properties that help you trace the execution of your code. This class cannot be inherited. More...
Static Public Member Functions | |
static void | Flush () |
Flushes the output buffer, and causes buffered data to be written to the P:System.Diagnostics.Trace.Listeners. More... | |
static void | Close () |
Flushes the output buffer, and then closes the P:System.Diagnostics.Trace.Listeners. More... | |
static void | Assert (bool condition) |
Checks for a condition; if the condition is false , displays a message box that shows the call stack. More... | |
static void | Assert (bool condition, string message) |
Checks for a condition; if the condition is false , outputs a specified message and displays a message box that shows the call stack. More... | |
static void | Assert (bool condition, string message, string detailMessage) |
Checks for a condition; if the condition is false , outputs two specified messages and displays a message box that shows the call stack. More... | |
static void | Fail (string message) |
Emits the specified error message. More... | |
static void | Fail (string message, string detailMessage) |
Emits an error message, and a detailed error message. More... | |
static void | Refresh () |
Refreshes the trace configuration data. More... | |
static void | TraceInformation (string message) |
Writes an informational message to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection using the specified message. More... | |
static void | TraceInformation (string format, params object[] args) |
Writes an informational message to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection using the specified array of objects and formatting information. More... | |
static void | TraceWarning (string message) |
Writes a warning message to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection using the specified message. More... | |
static void | TraceWarning (string format, params object[] args) |
Writes a warning message to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection using the specified array of objects and formatting information. More... | |
static void | TraceError (string message) |
Writes an error message to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection using the specified message. More... | |
static void | TraceError (string format, params object[] args) |
Writes an error message to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection using the specified array of objects and formatting information. More... | |
static void | Write (string message) |
Writes a message to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection. More... | |
static void | Write (object value) |
Writes the value of the object's M:System.Object.ToString method to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection. More... | |
static void | Write (string message, string category) |
Writes a category name and a message to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection. More... | |
static void | Write (object value, string category) |
Writes a category name and the value of the object's M:System.Object.ToString method to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection. More... | |
static void | WriteLine (string message) |
Writes a message to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection. More... | |
static void | WriteLine (object value) |
Writes the value of the object's M:System.Object.ToString method to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection. More... | |
static void | WriteLine (string message, string category) |
Writes a category name and message to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection. More... | |
static void | WriteLine (object value, string category) |
Writes a category name and the value of the object's M:System.Object.ToString method to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection. More... | |
static void | WriteIf (bool condition, string message) |
Writes a message to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection if a condition is true . More... | |
static void | WriteIf (bool condition, object value) |
Writes the value of the object's M:System.Object.ToString method to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection if a condition is true . More... | |
static void | WriteIf (bool condition, string message, string category) |
Writes a category name and message to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection if a condition is true . More... | |
static void | WriteIf (bool condition, object value, string category) |
Writes a category name and the value of the object's M:System.Object.ToString method to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection if a condition is true . More... | |
static void | WriteLineIf (bool condition, string message) |
Writes a message to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection if a condition is true . More... | |
static void | WriteLineIf (bool condition, object value) |
Writes the value of the object's M:System.Object.ToString method to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection if a condition is true . More... | |
static void | WriteLineIf (bool condition, string message, string category) |
Writes a category name and message to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection if a condition is true . More... | |
static void | WriteLineIf (bool condition, object value, string category) |
Writes a category name and the value of the object's M:System.Object.ToString method to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection if a condition is true . More... | |
static void | Indent () |
Increases the current P:System.Diagnostics.Trace.IndentLevel by one. More... | |
static void | Unindent () |
Decreases the current P:System.Diagnostics.Trace.IndentLevel by one. More... | |
Properties | |
static TraceListenerCollection | Listeners [get] |
Gets the collection of listeners that is monitoring the trace output. More... | |
static bool | AutoFlush [get, set] |
Gets or sets whether M:System.Diagnostics.Trace.Flush should be called on the P:System.Diagnostics.Trace.Listeners after every write. More... | |
static bool | UseGlobalLock [get, set] |
Gets or sets a value indicating whether the global lock should be used. More... | |
static CorrelationManager | CorrelationManager [get] |
Gets the correlation manager for the thread for this trace. More... | |
static int | IndentLevel [get, set] |
Gets or sets the indent level. More... | |
static int | IndentSize [get, set] |
Gets or sets the number of spaces in an indent. More... | |
Provides a set of methods and properties that help you trace the execution of your code. This class cannot be inherited.
|
static |
|
static |
Checks for a condition; if the condition is false
, outputs a specified message and displays a message box that shows the call stack.
condition | The conditional expression to evaluate. If the condition is true , the specified message is not sent and the message box is not displayed. |
message | The message to send to the P:System.Diagnostics.Trace.Listeners collection. |
|
static |
Checks for a condition; if the condition is false
, outputs two specified messages and displays a message box that shows the call stack.
condition | The conditional expression to evaluate. If the condition is true , the specified messages are not sent and the message box is not displayed. |
message | The message to send to the P:System.Diagnostics.Trace.Listeners collection. |
detailMessage | The detailed message to send to the P:System.Diagnostics.Trace.Listeners collection. |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Writes an error message to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection using the specified array of objects and formatting information.
format | A format string that contains zero or more format items, which correspond to objects in the args array. |
args | An object array containing zero or more objects to format. |
|
static |
|
static |
Writes an informational message to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection using the specified array of objects and formatting information.
format | A format string that contains zero or more format items, which correspond to objects in the args array. |
args | An object array containing zero or more objects to format. |
|
static |
|
static |
Writes a warning message to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection using the specified array of objects and formatting information.
format | A format string that contains zero or more format items, which correspond to objects in the args array. |
args | An object array containing zero or more objects to format. |
|
static |
|
static |
|
static |
Writes the value of the object's M:System.Object.ToString method to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection.
value | An T:System.Object whose name is sent to the P:System.Diagnostics.Trace.Listeners. |
|
static |
|
static |
Writes a category name and the value of the object's M:System.Object.ToString method to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection.
value | An T:System.Object name is sent to the P:System.Diagnostics.Trace.Listeners. |
category | A category name used to organize the output. |
|
static |
|
static |
Writes the value of the object's M:System.Object.ToString method to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection if a condition is true
.
condition | true to cause a message to be written; otherwise, false . |
value | An T:System.Object whose name is sent to the P:System.Diagnostics.Trace.Listeners. |
|
static |
Writes a category name and message to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection if a condition is true
.
condition | true to cause a message to be written; otherwise, false . |
message | A message to write. |
category | A category name used to organize the output. |
|
static |
Writes a category name and the value of the object's M:System.Object.ToString method to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection if a condition is true
.
condition | true to cause a message to be written; otherwise, false . |
value | An T:System.Object whose name is sent to the P:System.Diagnostics.Trace.Listeners. |
category | A category name used to organize the output. |
|
static |
|
static |
Writes the value of the object's M:System.Object.ToString method to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection.
value | An T:System.Object whose name is sent to the P:System.Diagnostics.Trace.Listeners. |
|
static |
|
static |
Writes a category name and the value of the object's M:System.Object.ToString method to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection.
value | An T:System.Object whose name is sent to the P:System.Diagnostics.Trace.Listeners. |
category | A category name used to organize the output. |
|
static |
|
static |
Writes the value of the object's M:System.Object.ToString method to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection if a condition is true
.
condition | true to cause a message to be written; otherwise, false . |
value | An T:System.Object whose name is sent to the P:System.Diagnostics.Trace.Listeners. |
|
static |
Writes a category name and message to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection if a condition is true
.
condition | true to cause a message to be written; otherwise, false . |
message | A message to write. |
category | A category name used to organize the output. |
|
static |
Writes a category name and the value of the object's M:System.Object.ToString method to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection if a condition is true
.
condition | true to cause a message to be written; otherwise, false . |
value | An T:System.Object whose name is sent to the P:System.Diagnostics.Trace.Listeners. |
category | A category name used to organize the output. |
|
staticgetset |
Gets or sets whether M:System.Diagnostics.Trace.Flush should be called on the P:System.Diagnostics.Trace.Listeners after every write.
true
if M:System.Diagnostics.Trace.Flush is called on the P:System.Diagnostics.Trace.Listeners after every write; otherwise, false
.
|
staticget |
|
staticgetset |
|
staticgetset |
|
staticget |
|
staticgetset |