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));
}