Example #1
0
        private string[] ReadMembers()
        {
            this.XmlReader.AssertElementStart("members");

            List<string> members = new List<string>();

            while (true)
            {
                this.XmlReader.AssertRead();

                if (this.XmlReader.IsElementEnd("members"))
                {
                    break;
                }

                if (this.XmlReader.IsElementStart("name"))
                {
                    members.AddIfNotNullOrWhiteSpace(this.ReadName());
                }
                else
                {
                    this.ThrowInvalidFormatException();
                }
            }

            return members.ToArray();
        }
Example #2
0
        private string[] ReadUrls()
        {
            this.XmlReader.AssertElementStart("urls");

            List<string> urls = new List<string>();

            while (true)
            {
                this.XmlReader.AssertRead();

                if (this.XmlReader.IsElementEnd("urls"))
                {
                    break;
                }

                if (this.XmlReader.IsElementStart("url"))
                {
                    urls.AddIfNotNullOrWhiteSpace(this.ReadUrl());
                }
                else
                {
                    this.ThrowInvalidFormatException();
                }
            }

            return urls.ToArray();
        }