18 return TraceInternal.Listeners;
30 return TraceInternal.AutoFlush;
35 TraceInternal.AutoFlush = value;
47 return TraceInternal.UseGlobalLock;
52 TraceInternal.UseGlobalLock = value;
63 if (correlationManager ==
null)
67 return correlationManager;
77 return TraceInternal.IndentLevel;
81 TraceInternal.IndentLevel = value;
91 return TraceInternal.IndentSize;
95 TraceInternal.IndentSize = value;
104 [Conditional(
"TRACE")]
107 TraceInternal.Flush();
111 [Conditional(
"TRACE")]
115 TraceInternal.Close();
120 [Conditional(
"TRACE")]
121 public static void Assert(
bool condition)
123 TraceInternal.Assert(condition);
129 [Conditional(
"TRACE")]
130 public static void Assert(
bool condition,
string message)
132 TraceInternal.Assert(condition, message);
139 [Conditional(
"TRACE")]
140 public static void Assert(
bool condition,
string message,
string detailMessage)
142 TraceInternal.Assert(condition, message, detailMessage);
147 [Conditional(
"TRACE")]
148 public static void Fail(
string message)
150 TraceInternal.Fail(message);
156 [Conditional(
"TRACE")]
157 public static void Fail(
string message,
string detailMessage)
159 TraceInternal.Fail(message, detailMessage);
165 DiagnosticsConfiguration.Refresh();
168 TraceInternal.Refresh();
173 [Conditional(
"TRACE")]
176 TraceInternal.TraceEvent(
TraceEventType.Information, 0, message,
null);
182 [Conditional(
"TRACE")]
185 TraceInternal.TraceEvent(
TraceEventType.Information, 0, format, args);
190 [Conditional(
"TRACE")]
193 TraceInternal.TraceEvent(
TraceEventType.Warning, 0, message,
null);
199 [Conditional(
"TRACE")]
202 TraceInternal.TraceEvent(
TraceEventType.Warning, 0, format, args);
207 [Conditional(
"TRACE")]
216 [Conditional(
"TRACE")]
217 public static void TraceError(
string format, params
object[] args)
224 [Conditional(
"TRACE")]
225 public static void Write(
string message)
227 TraceInternal.Write(message);
232 [Conditional(
"TRACE")]
233 public static void Write(
object value)
235 TraceInternal.Write(value);
241 [Conditional(
"TRACE")]
242 public static void Write(
string message,
string category)
244 TraceInternal.Write(message, category);
250 [Conditional(
"TRACE")]
251 public static void Write(
object value,
string category)
253 TraceInternal.Write(value, category);
258 [Conditional(
"TRACE")]
261 TraceInternal.WriteLine(message);
266 [Conditional(
"TRACE")]
269 TraceInternal.WriteLine(value);
275 [Conditional(
"TRACE")]
276 public static void WriteLine(
string message,
string category)
278 TraceInternal.WriteLine(message, category);
284 [Conditional(
"TRACE")]
285 public static void WriteLine(
object value,
string category)
287 TraceInternal.WriteLine(value, category);
294 [Conditional(
"TRACE")]
295 public static void WriteIf(
bool condition,
string message)
297 TraceInternal.WriteIf(condition, message);
304 [Conditional(
"TRACE")]
305 public static void WriteIf(
bool condition,
object value)
307 TraceInternal.WriteIf(condition, value);
315 [Conditional(
"TRACE")]
316 public static void WriteIf(
bool condition,
string message,
string category)
318 TraceInternal.WriteIf(condition, message, category);
326 [Conditional(
"TRACE")]
327 public static void WriteIf(
bool condition,
object value,
string category)
329 TraceInternal.WriteIf(condition, value, category);
336 [Conditional(
"TRACE")]
339 TraceInternal.WriteLineIf(condition, message);
346 [Conditional(
"TRACE")]
349 TraceInternal.WriteLineIf(condition, value);
357 [Conditional(
"TRACE")]
358 public static void WriteLineIf(
bool condition,
string message,
string category)
360 TraceInternal.WriteLineIf(condition, message, category);
368 [Conditional(
"TRACE")]
369 public static void WriteLineIf(
bool condition,
object value,
string category)
371 TraceInternal.WriteLineIf(condition, value, category);
375 [Conditional(
"TRACE")]
378 TraceInternal.Indent();
382 [Conditional(
"TRACE")]
385 TraceInternal.Unindent();
Provides a thread-safe list of T:System.Diagnostics.TraceListener objects.
static void WriteLine(string message)
Writes a message to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection.
static void Indent()
Increases the current P:System.Diagnostics.Trace.IndentLevel by one.
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:Syst...
Describes a set of security permissions applied to code. This class cannot be inherited.
static void WriteIf(bool condition, string message, string category)
Writes a category name and message to the trace listeners in the P:System.Diagnostics....
static int IndentLevel
Gets or sets the indent level.
static void Fail(string message)
Emits the specified error message.
static void Assert(bool condition, string message)
Checks for a condition; if the condition is false, outputs a specified message and displays a message...
static void Write(object value)
Writes the value of the object's M:System.Object.ToString method to the trace listeners in the P:Syst...
Provides a set of methods and properties that help you trace the execution of your code....
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 lis...
Exposes state that might be shared between threads.
static CorrelationManager CorrelationManager
Gets the correlation manager for the thread for this trace.
static int IndentSize
Gets or sets the number of spaces in an indent.
static void WriteLineIf(bool condition, string message)
Writes a message to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection if a c...
static void TraceWarning(string format, params object[] args)
Writes a warning message to the trace listeners in the P:System.Diagnostics.Trace....
static void Close()
Flushes the output buffer, and then closes the P:System.Diagnostics.Trace.Listeners.
static void TraceInformation(string format, params object[] args)
Writes an informational message to the trace listeners in the P:System.Diagnostics....
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 mess...
SecurityAction
Specifies the security actions that can be performed using declarative security.
Correlates traces that are part of a logical transaction.
Provides a set of methods and properties that enable applications to trace the execution of code and ...
static void WriteLine(string message, string category)
Writes a category name and message to the trace listeners in the P:System.Diagnostics....
static void Write(string message)
Writes a message to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection.
static void Assert(bool condition)
Checks for a condition; if the condition is false, displays a message box that shows the call stack.
static void TraceError(string format, params object[] args)
Writes an error message to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection...
static void WriteLine(object value)
Writes the value of the object's M:System.Object.ToString method to the trace listeners in the P:Syst...
static void TraceInformation(string message)
Writes an informational message to the trace listeners in the P:System.Diagnostics....
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 lis...
static void TraceError(string message)
Writes an error message to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection...
TraceEventType
Identifies the type of event that has caused the trace.
static void Flush()
Flushes the output buffer, and causes buffered data to be written to the P:System....
void Demand()
Forces a T:System.Security.SecurityException at run time if all callers higher in the call stack have...
static bool AutoFlush
Gets or sets whether M:System.Diagnostics.Trace.Flush should be called on the P:System....
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 lis...
static void Refresh()
Refreshes the trace configuration data.
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:Syst...
static void WriteIf(bool condition, string message)
Writes a message to the trace listeners in the P:System.Diagnostics.Trace.Listeners collection if a c...
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 lis...
static void Write(string message, string category)
Writes a category name and a message to the trace listeners in the P:System.Diagnostics....
static TraceListenerCollection Listeners
Gets the collection of listeners that is monitoring the trace output.
SecurityPermissionFlag
Specifies access flags for the security permission object.
static void Unindent()
Decreases the current P:System.Diagnostics.Trace.IndentLevel by one.
static void WriteLineIf(bool condition, string message, string category)
Writes a category name and message to the trace listeners in the P:System.Diagnostics....
static bool UseGlobalLock
Gets or sets a value indicating whether the global lock should be used.
Provides an abstract base class to create new debugging and tracing switches.
static void TraceWarning(string message)
Writes a warning message to the trace listeners in the P:System.Diagnostics.Trace....
static void Fail(string message, string detailMessage)
Emits an error message, and a detailed error message.