Save() public method

Save the currently loaded (in memory) configuration back to the XML file.
public Save ( ) : void
return void
Ejemplo n.º 1
0
 public void TestConfig()
 {
     string configpath = Path.GetFullPath("testconfig.conf");
     try
     {
         //Create new config file with default values
         Config config = new Config(configpath);
         //Notifications should be switched on by default
         Assert.IsTrue(config.Notifications);
         Assert.AreEqual(config.Folders.Count, 0);
         config.Save();
         config = new Config(configpath);
     }
     catch (Exception)
     {
         if (File.Exists(configpath))
             File.Delete(configpath);
         throw;
     }
     File.Delete(configpath);
 }