Exemple #1
0
        public DynamicSegmentationConfiguration Deserialize(string file)
        {
            XmlSerializer xs     = new XmlSerializer(typeof(DynamicSegmentationConfiguration));
            StreamReader  reader = File.OpenText(file);
            DynamicSegmentationConfiguration c = (DynamicSegmentationConfiguration)xs.Deserialize(reader);

            reader.Close();
            return(c);
        }
Exemple #2
0
        public void Serialize(string file, DynamicSegmentationConfiguration c)
        {
            XmlSerializer xs     = new XmlSerializer(c.GetType());
            StreamWriter  writer = File.CreateText(file);

            xs.Serialize(writer, c);
            writer.Flush();
            writer.Close();
        }