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

            this.server = server;
        }