Exemplo n.º 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--;
     }
 }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
        public override bool IsSamePosition(XPathNavigator other)
        {
            XmlDocumentNavigator nav = (other as XmlDocumentNavigator);

            return((nav != null) && (nav.node == node) && (nav.nsAttr == nsAttr));
        }
Exemplo n.º 4
0
 public XmlDocumentNavigator(XmlDocumentNavigator copy)
 {
     this.MoveTo(copy);
 }