public void Load(string configFileName)
        {
            RefIdManager.Reset( );

            try {
                using (TextReader reader = new StreamReader(configFileName)) {
                    Configuration = (ConfigurationRoot)_serializer.Deserialize(reader);
                }
            }
            catch (Exception e) {
                Debug.Print("ConfigurationManager.Load: caught exception reading '{0}':\n{1}", configFileName, e);
                throw;
            }
            Debug.Print("ConfigurationManager.Load: RefIdManager.Peek() [2] returns {0}", RefIdManager.Peek( ));
        }
        public void Load(string configFileName)
        {
            RefIdManager.Reset( );

            Debug.Print("ConfigurationManager.Load: Trying to read configuration file '{0}'", configFileName);
            try {
                using (TextReader reader = new StreamReader(configFileName)) {
                    var serializer = new XmlSerializer(typeof(ConfigurationRoot), ConfigurationNameSpace);
                    Configuration = (ConfigurationRoot)serializer.Deserialize(reader);
                }
            }
            catch (Exception e) {
                Debug.Print("ConfigurationManager.Load: caught exception reading '{0}':\n{1}", configFileName, e);
                throw;
            }
            Debug.Print("ConfigurationManager.Load: RefIdManager.Peek() returns {0}", RefIdManager.Peek( ));
        }
 public NetworkConfiguration( )
 {
     Servers = new Collection <ServerRef>( );
     RefId   = RefIdManager.GetNext( );
 }
 public ServerConfiguration( )
 {
     Ports = new Collection <int>( );
     RefId = RefIdManager.GetNext( );
 }