Inheritance: System.Xml.XPath.XPathNavigator, IHasXmlNode
        public override bool IsSamePosition(XPathNavigator other)
        {
            if (other == null)
            {
                return(false);
            }
            DataDocumentXPathNavigator navigator = other as DataDocumentXPathNavigator;

            return(((navigator != null) && (this._doc == navigator.Document)) && this._curNode.IsSamePosition(navigator.CurNode));
        }
 private XPathNodePointer(DataDocumentXPathNavigator owner, XmlDataDocument doc, XmlNode node, DataColumn c, bool bOnValue, XmlBoundElement parentOfNS)
 {
     this._owner = new WeakReference(owner);
     this._doc = doc;
     this._node = node;
     this._column = c;
     this._fOnValue = bOnValue;
     this._parentOfNS = parentOfNS;
     this._doc.AddPointer(this);
     this._bNeedFoliate = false;
 }
 public override XmlNodeOrder ComparePosition(XPathNavigator other)
 {
     if (other != null)
     {
         DataDocumentXPathNavigator navigator = other as DataDocumentXPathNavigator;
         if ((navigator != null) && (navigator.Document == this._doc))
         {
             return(this._curNode.ComparePosition(navigator.CurNode));
         }
     }
     return(XmlNodeOrder.Unknown);
 }
        public override XmlNodeOrder ComparePosition(XPathNavigator other)
        {
            if (other == null)
            {
                return(XmlNodeOrder.Unknown); // this is what XPathDocument does.
            }

            DataDocumentXPathNavigator otherDataDocXPathNav = other as DataDocumentXPathNavigator;

            return(otherDataDocXPathNav == null || otherDataDocXPathNav.Document != _doc ?
                   XmlNodeOrder.Unknown :
                   _curNode.ComparePosition(otherDataDocXPathNav.CurNode));
        }
 public override bool IsSamePosition(XPathNavigator other)
 {
     if (other != null)
     {
         DataDocumentXPathNavigator otherDataDocXPathNav = other as DataDocumentXPathNavigator;
         if (otherDataDocXPathNav != null &&
             _doc == otherDataDocXPathNav.Document && _curNode.IsSamePosition(otherDataDocXPathNav.CurNode))
         {
             return(true);
         }
     }
     return(false);
 }
 public override bool MoveTo(XPathNavigator other)
 {
     if (other != null)
     {
         DataDocumentXPathNavigator otherDataDocXPathNav = other as DataDocumentXPathNavigator;
         if (otherDataDocXPathNav != null && _curNode.MoveTo(otherDataDocXPathNav.CurNode))
         {
             _doc = _curNode.Document;
             return(true);
         }
     }
     return(false);
 }
示例#7
0
        public override XmlNodeOrder ComparePosition(XPathNavigator other)
        {
            if (other == null)
            {
                throw new NullReferenceException();
            }

            DataDocumentXPathNavigator otherDataDocXPathNav = other as DataDocumentXPathNavigator;

            if (otherDataDocXPathNav == null || otherDataDocXPathNav.Document != this._doc)
            {
                return(XmlNodeOrder.Unknown);
            }

            return(this._curNode.ComparePosition(otherDataDocXPathNav.CurNode));
        }
 public override bool MoveTo(XPathNavigator other)
 {
     if (other != null)
     {
         DataDocumentXPathNavigator navigator = other as DataDocumentXPathNavigator;
         if (navigator == null)
         {
             return(false);
         }
         if (this._curNode.MoveTo(navigator.CurNode))
         {
             this._doc = this._curNode.Document;
             return(true);
         }
     }
     return(false);
 }
 private DataDocumentXPathNavigator(DataDocumentXPathNavigator other)
 {
     this._curNode = other._curNode.Clone(this);
     this._temp    = other._temp.Clone(this);
     this._doc     = other._doc;
 }
示例#10
0
 internal XPathNodePointer Clone( DataDocumentXPathNavigator owner ){
     //Debug.WriteLineIf( XmlTrace.traceXPathNodePointerFunctions.Enabled, "XPathNodePointer:Clone");
     RealFoliate();
     return new XPathNodePointer( owner, this ) ;
 }
示例#11
0
 private XPathNodePointer( DataDocumentXPathNavigator owner, XmlDataDocument doc, XmlNode node, DataColumn c, bool bOnValue, XmlBoundElement parentOfNS ) {
     Debug.Assert( owner != null );
     this._owner = new WeakReference( owner );
     this._doc = doc;
     this._node = node;
     this._column = c;
     this._fOnValue = bOnValue;
     this._parentOfNS = parentOfNS;
     // Add this pointer to the document so it will be updated each time region changes it's foliation state.
     this._doc.AddPointer( (IXmlDataVirtualNode)this );
     _bNeedFoliate = false;
     AssertValid();
 }
示例#12
0
 internal XPathNodePointer( DataDocumentXPathNavigator owner, XPathNodePointer pointer ) 
 : this ( owner, pointer._doc, pointer._node, pointer._column, pointer._fOnValue, pointer._parentOfNS ) { 
 }
示例#13
0
 //when the constructor is called, the node has to be a valid XPath node at the valid location ( for example, the first
 //text/WS/SWS/CData nodes of a series continuous text-like nodes.
 internal XPathNodePointer( DataDocumentXPathNavigator owner,  XmlDataDocument doc, XmlNode node ) 
 : this ( owner, doc, node, null, false, null ){             
 }
 private DataDocumentXPathNavigator( DataDocumentXPathNavigator other ) {
     this._curNode = other._curNode.Clone( this );
     this._temp = other._temp.Clone( this );
     this._doc = other._doc;
 }
示例#15
0
 internal XPathNodePointer Clone(DataDocumentXPathNavigator owner)
 {
     RealFoliate();
     return new XPathNodePointer(owner, this);
 }