public static void Save(Configuration config, Stream stream) { using (stream) { XmlWriterSettings settings = new XmlWriterSettings { NewLineHandling = NewLineHandling.Entitize, Indent = true }; using (XmlWriter writer = XmlWriter.Create(stream, settings)) { XmlSerializer serializer = new XmlSerializer(typeof(Configuration)); serializer.Serialize(writer, config); } } }
public static void Save(Configuration config, String path) { Save(config, new FileStream(path, FileMode.Truncate, FileAccess.Write)); }
public Launcher(Server server, IoCContainer iocc) { config = iocc.RetrieveContract<Configuration>(); this.server = server; }