Beispiel #1
0
 /// <summary>
 /// 还原状态信息
 /// </summary>
 public static void Restore()
 {
     string bakupFile = new IniHelper().ReadValue("StateCenter", "State.Serialize.File.Name", "Iveely.State.Center.ser");
     if (File.Exists(bakupFile))
     {
         _tree = Serializer.DeserializeFromFile<MultiTree>(bakupFile);
     }
 }
Beispiel #2
0
 public void TestCleanRestoreBackup()
 {
     string bakupFile = new IniHelper().ReadValue("StateCenter", "State.Serialize.File.Name", "Iveely.State.Center.ser");
     if (File.Exists(bakupFile))
     {
         File.Delete(bakupFile);
     }
     CleanAll();
     const string pathA = "ISE://mypath/pathA";
     Put(pathA, "A");
     Assert.IsTrue(IsExist(pathA));
     Backup();
     CleanAll();
     Assert.IsFalse(IsExist(pathA));
     Restore();
     Assert.IsTrue(IsExist(pathA));
 }