Пример #1
0
        public void ReadXml(XmlReader reader)
        {
            Name = reader.GetAttribute("Name");
            reader.Read();

            Servers = new List <ServerSettings>();

            while (reader.IsEmptyElement)
            {
                if (reader.Name == "Server")
                {
                    var net = new ServerSettings();
                    net.ReadXml(reader);
                    AddServer(net);
                    reader.Read();
                }
                else if (reader.Name == "Channel")
                {
                    var chan = new ChannelSettings();
                    chan.ReadXml(reader);
                    AddChannel(chan);
                    reader.Read();
                }
            }
        }