[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dotgnu-pnet-commits] pnetlib/System/Diagnostics Switch.cs, 1.2, 1.3 Tra
From: |
Rhys Weatherley <address@hidden> |
Subject: |
[Dotgnu-pnet-commits] pnetlib/System/Diagnostics Switch.cs, 1.2, 1.3 Trace.cs, 1.4, 1.5 |
Date: |
Wed, 26 Nov 2003 00:24:03 +0000 |
Update of /cvsroot/dotgnu-pnet/pnetlib/System/Diagnostics
In directory subversions:/tmp/cvs-serv2546/System/Diagnostics
Modified Files:
Switch.cs Trace.cs
Log Message:
Configuration of diagnostic switch options.
Index: Trace.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System/Diagnostics/Trace.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** Trace.cs 25 Nov 2003 23:53:29 -0000 1.4
--- Trace.cs 26 Nov 2003 00:24:01 -0000 1.5
***************
*** 38,42 ****
private static int indentSize = 4;
private static TraceListenerCollection listeners;
! private static Hashtable switches;
// This class cannot be instantiated.
--- 38,42 ----
private static int indentSize = 4;
private static TraceListenerCollection listeners;
! internal static Hashtable switches;
// This class cannot be instantiated.
***************
*** 44,48 ****
// Make sure that the trace configuration is loaded.
! private static void Initialize()
{
Object value;
--- 44,48 ----
// Make sure that the trace configuration is loaded.
! internal static void Initialize()
{
Object value;
Index: Switch.cs
===================================================================
RCS file: /cvsroot/dotgnu-pnet/pnetlib/System/Diagnostics/Switch.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Switch.cs 29 May 2003 05:38:18 -0000 1.2
--- Switch.cs 26 Nov 2003 00:24:01 -0000 1.3
***************
*** 25,28 ****
--- 25,29 ----
using System.Collections;
+ using System.Collections.Specialized;
public abstract class Switch
***************
*** 99,104 ****
private static void LoadSwitchValues(Hashtable values)
{
! // We don't use this form of configuration at
the moment.
! // Provided for compatibility only.
}
--- 100,124 ----
private static void LoadSwitchValues(Hashtable values)
{
! Hashtable switches;
! lock(typeof(Trace))
! {
! Trace.Initialize();
! switches = Trace.switches;
! }
! if(switches != null)
! {
! IDictionaryEnumerator e =
switches.GetEnumerator();
! while(e.MoveNext())
! {
! try
! {
! values[e.Key] =
Int32.Parse((String)(e.Value));
! }
! catch(Exception)
! {
! // Ignore parsing
errors.
! }
! }
! }
}
***************
*** 110,114 ****
if(switchValues == null)
{
! switchValues = new Hashtable();
LoadSwitchValues(switchValues);
}
--- 130,135 ----
if(switchValues == null)
{
! switchValues = CollectionsUtil
!
.CreateCaseInsensitiveHashtable();
LoadSwitchValues(switchValues);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Dotgnu-pnet-commits] pnetlib/System/Diagnostics Switch.cs, 1.2, 1.3 Trace.cs, 1.4, 1.5,
Rhys Weatherley <address@hidden> <=