public void Initialize(string ConfigFileLoc)
 {
     if (File.Exists(ConfigFileLoc))
     {
         var          ConfigLoader = new XmlSerializer(typeof(PersistentConfiguration));
         StreamReader ConfigReader = File.OpenText(ConfigFileLoc);
         var          Config       = (PersistentConfiguration)ConfigLoader.Deserialize(ConfigReader);
         ConfigReader.Close();
         Configuration = Config;
         ConfigFile    = ConfigFileLoc;
     }
     else
     {
         //if (LogManager.Singleton != null) LogManager.Singleton.LogMessage("ConfigurationManager: Could not load config. File not found. " + ConfigFileLoc);
     }
 }
Esempio n. 2
0
 public void Initialize(string ConfigFileLoc)
 {
     if (File.Exists(ConfigFileLoc))
     {
         var ConfigLoader = new XmlSerializer(typeof (PersistentConfiguration));
         StreamReader ConfigReader = File.OpenText(ConfigFileLoc);
         var Config = (PersistentConfiguration) ConfigLoader.Deserialize(ConfigReader);
         ConfigReader.Close();
         Configuration = Config;
         ConfigFile = ConfigFileLoc;
     }
     else
     {
         //if (LogManager.Singleton != null) LogManager.Singleton.LogMessage("ConfigurationManager: Could not load config. File not found. " + ConfigFileLoc);
     }
 }