Ejemplo n.º 1
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);
 }
Ejemplo n.º 2
0
 public XNodeNavigator(XNodeNavigator other)
 {
     source    = other.source;
     parent    = other.parent;
     nameTable = other.nameTable;
 }