Exemplo n.º 1
0
        /// <summary>
        /// Reads the <see cref="SpecHierarchy"/> which is specific to the <see cref="Specification"/> class.
        /// </summary>
        /// <param name="reader">
        /// an instance of <see cref="XmlReader"/>
        /// </param>
        protected override void ReadHierarchy(XmlReader reader)
        {
            while (reader.Read())
            {
                if (reader.MoveToContent() == XmlNodeType.Element && reader.LocalName == "SPEC-HIERARCHY")
                {
                    using (var subtree = reader.ReadSubtree())
                    {
                        subtree.MoveToContent();

                        var specHierarchy = new SpecHierarchy(this, this.ReqIFContent, this.loggerFactory);
                        specHierarchy.ReadXml(subtree);
                    }
                }
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Reads the <see cref="SpecType"/> which is specific to the <see cref="Specification"/> class.
        /// </summary>
        /// <param name="reader">
        /// an instance of <see cref="XmlReader"/>
        /// </param>
        private void DeserializeSpecHierarchy(XmlReader reader)
        {
            while (reader.Read())
            {
                if (reader.MoveToContent() == XmlNodeType.Element && reader.LocalName == "SPEC-HIERARCHY")
                {
                    if (bool.TryParse(reader.GetAttribute("IS-TABLE-INTERNAL"), out var isTableInternal))
                    {
                        this.IsTableInternal = isTableInternal;
                    }

                    using (var subtree = reader.ReadSubtree())
                    {
                        subtree.MoveToContent();
                        var specHierarchy = new SpecHierarchy(this, this.Root, this.ReqIfContent, this.loggerFactory);
                        specHierarchy.ReadXml(subtree);
                    }
                }
            }
        }