System.Xml.Xsl.Runtime.DescendantIterator.Create C# (CSharp) Method

Create() public method

Initialize the DescendantIterator (no possibility of duplicates).
public Create ( XPathNavigator input, XmlNavigatorFilter filter, bool orSelf ) : void
input System.Xml.XPath.XPathNavigator
filter XmlNavigatorFilter
orSelf bool
return void
        public void Create(XPathNavigator input, XmlNavigatorFilter filter, bool orSelf) {
            // Save input node as current node
            this.navCurrent = XmlQueryRuntime.SyncToNavigator(this.navCurrent, input);
            this.filter = filter;

            // Position navEnd to the node at which the descendant scan should terminate
            if (input.NodeType == XPathNodeType.Root) {
                this.navEnd = null;
            }
            else {
                this.navEnd = XmlQueryRuntime.SyncToNavigator(this.navEnd, input);
                this.navEnd.MoveToNonDescendant();
            }

            // If self node matches, then return it first
            this.hasFirst = (orSelf && !this.filter.IsFiltered(this.navCurrent));
        }
DescendantIterator