Пример #1
0
        // --------------------------------
        // - Begin internal methods region -
        // --------------------------------

        /// <summary>
        /// Add Attribute and Macros instances using a raw xml file (that is generated by the ODD).
        /// </summary>
        /// <param name="parentNode">The parent node for the attributes and macros.</param>
        internal void AddAttributesAndMacros(XPathNavigator parentNode)
        {
            //
            // Add attributes.
            //

            XPathNodeIterator attributeNodes = parentNode.Select("Attribute");

            foreach (XPathNavigator attributeNode in attributeNodes)
            {
                Attribute attribute = Attribute.Create(attributeNode, this);
                this.Add(attribute);
            }


            //
            // Add macros.
            //

            XPathNodeIterator macroNodes = parentNode.Select("Macro");

            foreach (XPathNavigator macroNode in macroNodes)
            {
                Macro macro = Macro.Create(macroNode, this);
                this.Add(macro);
            }
        }