ServerTools.InfoTicker.UpdateXml C# (CSharp) Method

UpdateXml() private static method

private static UpdateXml ( ) : void
return void
        private static void UpdateXml()
        {
            fileWatcher.EnableRaisingEvents = false;
            using (StreamWriter sw = new StreamWriter(filePath))
            {
                sw.WriteLine("<?xml version=\"1.0\" encoding=\"UTF-8\"?>");
                sw.WriteLine("<InfoTicketer>");
                sw.WriteLine("    <Messages>");
                if (dict.Count > 0)
                {
                    foreach (KeyValuePair<string, int> kvp in dict)
                    {
                        sw.WriteLine(string.Format("        <Message id=\"{0}\" Message=\"{1}\" />", kvp.Value, kvp.Key));
                    }
                }
                else
                {
                    sw.WriteLine("        <!-- <Message id=\"1\" Message=\"Type /gimme once an hour for a free gift!\" /> -->");
                    sw.WriteLine("        <!-- <Message id=\"1\" Message=\"Typ /gimme, einmal pro Stunde für ein freies Geschenk!\" /> -->");
                    sw.WriteLine("        <!-- <Message id=\"2\" Message=\"Visit Yoursitehere for rules, custom recipes and forum discussions!\" /> -->");
                    sw.WriteLine("        <!-- <Message id=\"2\" Message=\"Besuchen Yoursitehere für Regelungen , kundenspezifische Rezepturen und Forumsdiskussionen!\" /> -->");
                    sw.WriteLine("        <!-- <Message id=\"3\" Message=\"Have a suggestion or complaint? Post on our forums and let us know  at Yoursitehere!\" /> -->");
                    sw.WriteLine("        <!-- <Message id=\"4\" Message=\"Type /commands for a list of the chat commands.\" /> -->");
                }
                sw.WriteLine("    </Messages>");
                sw.WriteLine("</InfoTicketer>");
                sw.Flush();
                sw.Close();
            }
            fileWatcher.EnableRaisingEvents = true;
        }