LaunchServer.ServerWrapper.Save C# (CSharp) Méthode

Save() private méthode

private Save ( ) : void
Résultat void
        private void Save()
        {
            XmlWriter xml = new XmlTextWriter("Hurrscript.xml",Encoding.UTF8);
            xml.WriteStartDocument();
            xml.WriteStartElement("config");

            xml.WriteAttributeString("max_players", MaxPlayers.ToString());

            xml.WriteStartElement("whitelist");
            foreach (string wle in Whitelist)
                xml.WriteElementString("player", wle);
            xml.WriteEndElement();

            xml.WriteStartElement("bans");
            foreach (string wle in Bans)
                xml.WriteElementString("player", wle);
            xml.WriteEndElement();

            xml.WriteEndElement();
            xml.WriteEndDocument();
            xml.Close();
        }