Ejemplo n.º 1
0
        public FrequencyAnalysis Deserialize()
        {
            File.Copy("db.xml", "db_backup.xml", true);
            FrequencyAnalysis analyzer = new FrequencyAnalysis();

            using (Stream textReader = File.Open("db.xml", FileMode.Open))
            {
                XmlSerializer deserializer = new XmlSerializer(this.GetType());
                analyzer = (FrequencyAnalysis)deserializer.Deserialize(textReader);
            }
            return(analyzer);
        }
Ejemplo n.º 2
0
 public FrequencyAnalysis Deserialize()
 {
     File.Copy("db.xml", "db_backup.xml", true);
     FrequencyAnalysis analyzer = new FrequencyAnalysis();
     using (Stream textReader = File.Open("db.xml", FileMode.Open))
     {
         XmlSerializer deserializer = new XmlSerializer(this.GetType());
         analyzer = (FrequencyAnalysis)deserializer.Deserialize(textReader);
     }
     return analyzer;
 }