Exemple #1
0
 // read n more entries
 private void Read(int n)
 {
     while (!finished && n != 0)
     {
         if (current.MoveNext())
         {
             XmlDocumentNavigator navigator =
                 ((current.Current) as XmlDocumentNavigator);
             cached.Add(navigator.CurrentNode);
             count++;
         }
         else
         {
             finished = true;
             break;
         }
         n--;
     }
 }
        public override bool MoveTo(XPathNavigator other)
        {
            XmlDocumentNavigator nav = (other as XmlDocumentNavigator);

            if (nav != null)
            {
                node     = nav.node;
                nsAttr   = nav.nsAttr;
                document = nav.document;
                xmlAttr  = nav.xmlAttr;
                if (nav.nsNames == null || nav.nsNames.IsReadOnly)
                {
                    nsNames = nav.nsNames;
                }
                else
                {
                    nsNames = ArrayList.ReadOnly(nav.nsNames);
                }
                return(true);
            }
            return(false);
        }
        public override bool IsSamePosition(XPathNavigator other)
        {
            XmlDocumentNavigator nav = (other as XmlDocumentNavigator);

            return((nav != null) && (nav.node == node) && (nav.nsAttr == nsAttr));
        }
 public XmlDocumentNavigator(XmlDocumentNavigator copy)
 {
     this.MoveTo(copy);
 }