Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Pryor <jpryor@novell.com>2002-12-18 19:01:09 +0300
committerJonathan Pryor <jpryor@novell.com>2002-12-18 19:01:09 +0300
commit60d72a0f50aa2294110af41620ae4f6cee078fc6 (patch)
tree12c0d94fd93bc805798bad9919f393fe46182c2a /mcs/class/System/System.Diagnostics/TraceImpl.cs
parent920f482d9c17fb0be3660878e81f71dfadeed35b (diff)
Switches (Boolean & Trace) should be working now. Behavior of user-provided
Switch derived classes should match that of .NET. Go forth and use Swiches! ;-) ChangeLog: * BooleanSwitch.cs: Complete re-write. It works now. * DefaultTraceListener.cs: - Use `const' strings, so I don't worry about copy/paste errors - Give `AssertUiEnabled' an actual backing member * DiagnosticsConfigurationHandler.cs: To avoid race conditions, let the configuration handler set .config-specified properties on DefaultTraceListener (AssertUiEnabled, LogFileName) and TraceImpl (AutoFlush, IndentSize). * Switch.cs: Near complete re-write. Actually works, and is (should be) comformant with .NET behavior. Changed member names because they were confusing me. (Yes, that doesn't say much about my memory.) * TextWriterTraceListener.cs: Append text to already existing files, don't overwrite them. * TraceImpl.cs: - Added private destructor, to ensure no instances are created. - Move members declarations to be closer to each other. * TraceSwitch.cs: Complete re-write. It works now. svn path=/trunk/mcs/; revision=9747
Diffstat (limited to 'mcs/class/System/System.Diagnostics/TraceImpl.cs')
-rw-r--r--mcs/class/System/System.Diagnostics/TraceImpl.cs19
1 files changed, 12 insertions, 7 deletions
diff --git a/mcs/class/System/System.Diagnostics/TraceImpl.cs b/mcs/class/System/System.Diagnostics/TraceImpl.cs
index f159f2518c4..623bf2a0c40 100644
--- a/mcs/class/System/System.Diagnostics/TraceImpl.cs
+++ b/mcs/class/System/System.Diagnostics/TraceImpl.cs
@@ -10,6 +10,7 @@
using System;
using System.Diagnostics;
+using System.Configuration;
namespace System.Diagnostics {
@@ -17,16 +18,23 @@ namespace System.Diagnostics {
private static object lock_ = new object ();
- private static bool autoFlush = false;
+ private static bool autoFlush;
+
+ [ThreadStatic]
+ private static int indentLevel = 0;
+
+ [ThreadStatic]
+ private static int indentSize;
+
+ private TraceImpl ()
+ {
+ }
public static bool AutoFlush {
get {return autoFlush;}
set {autoFlush = value;}
}
- [ThreadStatic]
- private static int indentLevel = 0;
-
public static int IndentLevel {
get {return indentLevel;}
set {
@@ -40,9 +48,6 @@ namespace System.Diagnostics {
}
}
- [ThreadStatic]
- private static int indentSize = 4;
-
public static int IndentSize {
get {return indentSize;}
set {