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); }
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(); }