Exemplo n.º 1
0
        public static List <Node> ReadNodeList(XmlReader reader, string tag)
        {
            List <Node> result = new List <Node> ();

            XmlReadHelper.ReadList(reader, tag, delegate()
            {
                switch (reader.LocalName)
                {
                case Section.XmlTag:
                    result.Add(Section.Read(reader));
                    return(true);

                case IfStatement.XmlTag:
                    result.Add(IfStatement.Read(reader));
                    return(true);

                case IfNotStatement.XmlTag:
                    result.Add(IfNotStatement.Read(reader));
                    return(true);

                case SwitchStatement.XmlTag:
                    result.Add(SwitchStatement.Read(reader));
                    return(true);
                }
                return(false);
            });
            return(result);
        }
Exemplo n.º 2
0
		public static IfNotStatement Read (XmlReader reader)
		{
			IfNotStatement result = new IfNotStatement ();
			if (reader.MoveToFirstAttribute ()) {
				do {
					result.SetAttribute (reader.LocalName, reader.Value);
				} while (reader.MoveToNextAttribute ());
			}
			result.Children = Node.ReadNodeList (reader, XmlTag);
			return result;
		}
Exemplo n.º 3
0
        public static IfNotStatement Read(XmlReader reader)
        {
            IfNotStatement result = new IfNotStatement();

            if (reader.MoveToFirstAttribute())
            {
                do
                {
                    result.SetAttribute(reader.LocalName, reader.Value);
                } while (reader.MoveToNextAttribute());
            }
            result.Children = Node.ReadNodeList(reader, XmlTag);
            return(result);
        }