System.Diagnostics.Trace Members

The members of System.Diagnostics.Trace are listed below.

See Also: Inherited members from System.Object

Public Properties

static
AutoFlushbool.

Gets or sets whether Trace.Flush should be called on the Trace.Listeners after every write.

[read-only]
static
CorrelationManagerCorrelationManager.

Gets the correlation manager for the thread for this trace.

static
IndentLevelint.

Gets or sets the indent level.

static
IndentSizeint.

Gets or sets the number of spaces in an indent.

[read-only]
static
ListenersTraceListenerCollection.

Gets the collection of listeners that is monitoring the trace output.

static
UseGlobalLockbool.

Gets or sets a value indicating whether the global lock should be used.

Public Methods

static
Assert(bool)

Checks for a condition; if the condition is false, displays a message box that shows the call stack.

static
Assert(bool, string)

Checks for a condition; if the condition is false, outputs a specified message and displays a message box that shows the call stack.

static
Assert(bool, string, string)

Checks for a condition; if the condition is false, outputs two specified messages and displays a message box that shows the call stack.

static
Close()

Flushes the output buffer, and then closes the Trace.Listeners.

static
Fail(string)

Emits the specified error message.

static
Fail(string, string)

Emits an error message, and a detailed error message.

static
Flush()

Flushes the output buffer, and causes buffered data to be written to the Trace.Listeners.

static
Indent()

Increases the current Trace.IndentLevel by one.

static
Refresh()

Refreshes the trace configuration data.

static
TraceError(string)

Writes an error message to the trace listeners in the Trace.Listeners collection using the specified message.

static
TraceError(string, params object[])

Writes an error message to the trace listeners in the Trace.Listeners collection using the specified array of objects and formatting information.

static
TraceInformation(string)

Writes an informational message to the trace listeners in the Trace.Listeners collection using the specified message.

static
TraceInformation(string, params object[])

Writes an informational message to the trace listeners in the Trace.Listeners collection using the specified array of objects and formatting information.

static
TraceWarning(string)

Writes a warning message to the trace listeners in the Trace.Listeners collection using the specified message.

static
TraceWarning(string, params object[])

Writes a warning message to the trace listeners in the Trace.Listeners collection using the specified array of objects and formatting information.

static
Unindent()

Decreases the current Trace.IndentLevel by one.

static
Write(object)

Writes the value of the object's object.ToString method to the trace listeners in the Trace.Listeners collection.

static
Write(string)

Writes a message to the trace listeners in the Trace.Listeners collection.

static
Write(object, string)

Writes a category name and the value of the object's object.ToString method to the trace listeners in the Trace.Listeners collection.

static
Write(string, string)

Writes a category name and a message to the trace listeners in the Trace.Listeners collection.

static
WriteIf(bool, object)

Writes the value of the object's object.ToString method to the trace listeners in the Trace.Listeners collection if a condition is true.

static
WriteIf(bool, string)

Writes a message to the trace listeners in the Trace.Listeners collection if a condition is true.

static
WriteIf(bool, object, string)

Writes a category name and the value of the object's object.ToString method to the trace listeners in the Trace.Listeners collection if a condition is true.

static
WriteIf(bool, string, string)

Writes a category name and message to the trace listeners in the Trace.Listeners collection if a condition is true.

static
WriteLine(object)

Writes the value of the object's object.ToString method to the trace listeners in the Trace.Listeners collection.

static
WriteLine(string)

Writes a message to the trace listeners in the Trace.Listeners collection.

static
WriteLine(object, string)

Writes a category name and the value of the object's object.ToString method to the trace listeners in the Trace.Listeners collection.

static
WriteLine(string, string)

Writes a category name and message to the trace listeners in the Trace.Listeners collection.

static
WriteLineIf(bool, object)

Writes the value of the object's object.ToString method to the trace listeners in the Trace.Listeners collection if a condition is true.

static
WriteLineIf(bool, string)

Writes a message to the trace listeners in the Trace.Listeners collection if a condition is true.

static
WriteLineIf(bool, object, string)

Writes a category name and the value of the object's object.ToString method to the trace listeners in the Trace.Listeners collection if a condition is true.

static
WriteLineIf(bool, string, string)

Writes a category name and message to the trace listeners in the Trace.Listeners collection if a condition is true.