예제 #1
0
        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);
                }
            }
        }
예제 #2
0
 public static void Save(Configuration config, String path)
 {
     Save(config, new FileStream(path, FileMode.Truncate, FileAccess.Write));
 }
예제 #3
0
        public Launcher(Server server, IoCContainer iocc)
        {
            config = iocc.RetrieveContract<Configuration>();

            this.server = server;
        }