Exemple #1
0
        public override void ConstructFromXml(XmlNode node, XmlDocument document)
        {
            base.ConstructFromXml(node, document);
            children.Clear();

            //One offs
            isSealed   = node.GetAttribute("sealed", "false").Equals("true", System.StringComparison.InvariantCultureIgnoreCase);
            isStatic   = node.GetAttribute("static", "false").Equals("true", System.StringComparison.InvariantCultureIgnoreCase);
            isPartial  = node.GetAttribute("partial", "false").Equals("true", System.StringComparison.InvariantCultureIgnoreCase);
            isAbstract = node.GetAttribute("abstract", "false").Equals("true", System.StringComparison.InvariantCultureIgnoreCase);
            @base      = node.GetAttribute("base");

            //Children
            foreach (XmlNode child in node.ChildNodes)
            {
                XmlBase xmlObj = XmlTemplate.CreateXmlObjectFromNode(child, document);

                if (xmlObj is XmlInterfaceContract)
                {
                    interfaces.Add(xmlObj as XmlInterfaceContract);
                }
                else if (xmlObj != null)
                {
                    children.Add(xmlObj);
                }
            }
        }
Exemple #2
0
        /// Constructs the object from an Xml node and document
        public override void ConstructFromXml(XmlNode node, XmlDocument document)
        {
            base.ConstructFromXml(node, document);

            //Children
            foreach (XmlNode child in node.ChildNodes)
            {
                XmlBase xmlBase = XmlTemplate.CreateXmlObjectFromNode(child, document);

                if (xmlBase != null)
                {
                    children.Add(xmlBase);
                }
            }
        }
        /// Constructs the object from an Xml node and document
        public override void ConstructFromXml(XmlNode node, XmlDocument document)
        {
            base.ConstructFromXml(node, document);
            buildOptionsToCheck = node.GetAttribute("options", string.Empty).Split(DELIMITERS, System.StringSplitOptions.RemoveEmptyEntries);
            isAND = node.GetAttribute("operator", "and").Equals("and", System.StringComparison.InvariantCultureIgnoreCase);

            //Children
            foreach (XmlNode child in node.ChildNodes)
            {
                XmlBase xmlBase = XmlTemplate.CreateXmlObjectFromNode(child, document);

                if (xmlBase != null)
                {
                    children.Add(xmlBase);
                }
            }
        }