Пример #1
0
        /// <summary> Node info </summary>
        public override Node Info()
        {
            Mapping mapping = new Mapping();

            mapping.AddMappingNode(new String("kind"), new String("mapping"));
            mapping.AddMappingNode(new String("type_id"), new String(URI));

            Mapping childs = new Mapping();
            int     i      = 0;

            foreach (MappingNode child in childNodes)
            {
                Sequence keyvaluepair = new Sequence();
                keyvaluepair.AddNode(child.Key.Info());
                keyvaluepair.AddNode(child.Value.Info());

                childs.AddMappingNode(new String("key_" + i), keyvaluepair);
                i++;
            }

            mapping.AddMappingNode(new String("value"), childs);
            return(mapping);
        }
Пример #2
0
        /// <summary> Node info </summary>
        public override Node Info()
        {
            Mapping mapping = new Mapping();

            mapping.AddMappingNode(new String("kind"), new String("sequence"));
            mapping.AddMappingNode(new String("type_id"), new String(URI));

            Sequence childs = new Sequence();

            foreach (Node child in childNodes)
            {
                childs.AddNode(child.Info());
            }

            mapping.AddMappingNode(new String("value"), childs);
            return(mapping);
        }
Пример #3
0
        /// <summary> Node info </summary>
        public override Node Info()
        {
            Mapping mapping = new Mapping();
            mapping.AddMappingNode(new String("kind"), new String("sequence"));
            mapping.AddMappingNode(new String("type_id"), new String(URI));

            Sequence childs = new Sequence();

            foreach (Node child in childNodes)
                childs.AddNode(child.Info());

            mapping.AddMappingNode(new String("value"), childs);
            return mapping;
        }
Пример #4
0
        /// <summary> Node info </summary>
        public override Node Info()
        {
            Mapping mapping = new Mapping();
            mapping.AddMappingNode(new String("kind"), new String("mapping"));
            mapping.AddMappingNode(new String("type_id"), new String(URI));

            Mapping childs = new Mapping();
            int i = 0;
            foreach (MappingNode child in childNodes)
            {
                Sequence keyvaluepair = new Sequence();
                keyvaluepair.AddNode(child.Key.Info());
                keyvaluepair.AddNode(child.Value.Info());

                childs.AddMappingNode(new String("key_" + i), keyvaluepair);
                i++;
            }

            mapping.AddMappingNode(new String("value"), childs);
            return mapping;
        }