get {return indentLevel;}
set {
lock (ListenersSyncRoot) {
+ indentLevel = value;
+
foreach (TraceListener t in Listeners) {
t.IndentLevel = indentLevel;
}
-
- indentLevel = value;
}
}
}
get {return indentSize;}
set {
lock (ListenersSyncRoot) {
+ indentSize = value;
+
foreach (TraceListener t in Listeners) {
t.IndentSize = indentSize;
}
-
- indentSize = value;
}
}
}
// The DiagnosticsConfigurationHandler assumes that the TraceImpl.Listeners
// collection exists (so it can initialize the DefaultTraceListener and
// add/remove existing listeners).
- private static void InitOnce ()
+ private static object InitOnce ()
{
+ object d = null;
#if !NO_LOCK_FREE
// The lock-free version
if (listeners == null) {
Thread.MemoryBarrier ();
while (Interlocked.CompareExchange (ref listeners, c, null) == null) {
// Read in the .config file and get the ball rolling...
- System.Collections.IDictionary d = DiagnosticsConfiguration.Settings;
-
- // remove warning about unused temporary
- d = d;
+ d = DiagnosticsConfiguration.Settings;
}
Thread.MemoryBarrier ();
}
lock (lock_) {
if (listeners == null) {
listeners = new TraceListenerCollection ();
-
// Read in the .config file and get the ball rolling...
- System.Collections.IDictionary d = DiagnosticsConfiguration.Settings;
-
- // remove warning about unused temporary
- d = d;
+ d = DiagnosticsConfiguration.Settings;
}
}
#endif
+ return d;
}
// FIXME: According to MSDN, this method should display a dialog box