Exemple #1
0
 public void ReadBackupItemList()
 {
     try
     {
         _backupItemList = new BackupItemList();
         if (File.Exists(BackupDataInfoFile))
         {
             using (FileStream fs = new FileStream(BackupDataInfoFile, FileMode.Open))
             {
                 Type[]        itemTypes  = { typeof(BackupItem) };
                 XmlSerializer serializer = new XmlSerializer(typeof(BackupItemList), itemTypes);
                 _backupItemList = (BackupItemList)serializer.Deserialize(fs);
                 serializer.Serialize(Console.Out, _backupItemList);
                 Console.ReadLine();
             }
         }
     }
     catch
     {
     }
 }
Exemple #2
0
 public void ReadBackupItemList()
 {
     try
     {
         _backupItemList = new BackupItemList();
         if (File.Exists(BackupDataInfoFile))
         {
             using (FileStream fs = new FileStream(BackupDataInfoFile, FileMode.Open))
             {
                 Type[] itemTypes = { typeof(BackupItem) };
                 XmlSerializer serializer = new XmlSerializer(typeof(BackupItemList), itemTypes);
                 _backupItemList = (BackupItemList)serializer.Deserialize(fs);
                 serializer.Serialize(Console.Out, _backupItemList);
                 Console.ReadLine();
             }
         }
     }
     catch
     {
     }
 }