private Parameter ParseParameter()
        {
            var node = new Parameter();

            var register = ParseRegister(false);

            if (register != null)
            {
                node.AddChild(register);
            }
            else
            {
                var type = ParseType();
                var id   = ParseIdentifier();

                node.AddChild(type);
                node.AddChild(id);
            }

            return(node);
        }
Beispiel #2
0
        public void TestAllowGenericChildNodes()
        {
            var elem = new Parameter();

            elem.AddChild("generic-tag").AddText("Content").SetOption("tag", true);

            Assert.AreEqual(
                "<?xml version=\"1.0\" encoding=\"utf-8\"?>" + Environment.NewLine +
                "<Parameter>" + Environment.NewLine +
                "  <generic-tag tag=\"True\">Content</generic-tag>" + Environment.NewLine +
                "</Parameter>",
                elem.ToString()
                );
        }