Exemple #1
0
        public override bool MoveTo(XPathNavigator navigator)
        {
            XNodeNavigator other = navigator as XNodeNavigator;

            if (other != null)
            {
                _source = other._source;
                _parent = other._parent;
                return(true);
            }
            return(false);
        }
 private static bool IsSamePosition(XNodeNavigator n1, XNodeNavigator n2)
 {
     if ((n1.source == n2.source) && (n1.parent == n2.parent))
     {
         return(true);
     }
     if ((n1.parent != null) ^ (n2.parent != null))
     {
         XText source = n1.source as XText;
         if (source != null)
         {
             return((source.Value == n2.source) && (source.parent == n2.parent));
         }
         XText text2 = n2.source as XText;
         if (text2 != null)
         {
             return((text2.Value == n1.source) && (text2.parent == n1.parent));
         }
     }
     return(false);
 }
Exemple #3
0
 static bool IsSamePosition(XNodeNavigator n1, XNodeNavigator n2)
 {
     if (n1.source == n2.source && n1.parent == n2.parent)
     {
         return(true);
     }
     // compare lazy text with eager text
     if (n1.parent != null ^ n2.parent != null)
     {
         XText t1 = n1.source as XText;
         if (t1 != null)
         {
             return((object)t1.Value == (object)n2.source && t1.parent == n2.parent);
         }
         XText t2 = n2.source as XText;
         if (t2 != null)
         {
             return((object)t2.Value == (object)n1.source && t2.parent == n1.parent);
         }
     }
     return(false);
 }
Exemple #4
0
 private static bool IsSamePosition(XNodeNavigator n1, XNodeNavigator n2)
 {
     return(n1._source == n2._source && n1._source.GetParent() == n2._source.GetParent());
 }
Exemple #5
0
 public XNodeNavigator(XNodeNavigator other)
 {
     _source    = other._source;
     _parent    = other._parent;
     _nameTable = other._nameTable;
 }
 public XNodeNavigator(XNodeNavigator other)
 {
     this.source    = other.source;
     this.parent    = other.parent;
     this.nameTable = other.nameTable;
 }
Exemple #7
0
 public XNodeNavigator(XNodeNavigator other)
 {
     source    = other.source;
     parent    = other.parent;
     nameTable = other.nameTable;
 }