示例#1
0
            /// <summary>
            /// Creates a new <see cref="T:System.Xml.XPath.XPathNavigator"></see> positioned at the same node as this <see cref="T:System.Xml.XPath.XPathNavigator"></see>.
            /// </summary>
            /// <returns>
            /// A new <see cref="T:System.Xml.XPath.XPathNavigator"></see> positioned at the same node as this <see cref="T:System.Xml.XPath.XPathNavigator"></see>.
            /// </returns>
            public override XPathNavigator Clone()
            {
                HttpValueXPathNavigator clone = new HttpValueXPathNavigator(_Collection);

                clone._Index     = _Index;
                clone._NameTable = _NameTable;
                clone._Value     = _Value;
                return(clone);
            }
示例#2
0
            /// <summary>
            /// Moves the <see cref="T:System.Xml.XPath.XPathNavigator"></see> to the same position as the specified <see cref="T:System.Xml.XPath.XPathNavigator"></see>.
            /// </summary>
            /// <param name="other">The <see cref="T:System.Xml.XPath.XPathNavigator"></see> positioned on the node that you want to move to.</param>
            /// <returns>
            /// Returns true if the <see cref="T:System.Xml.XPath.XPathNavigator"></see> is successful moving to the same position as the specified <see cref="T:System.Xml.XPath.XPathNavigator"></see>; otherwise, false. If false, the position of the <see cref="T:System.Xml.XPath.XPathNavigator"></see> is unchanged.
            /// </returns>
            public override bool MoveTo(XPathNavigator other)
            {
                HttpValueXPathNavigator xpath = other as HttpValueXPathNavigator;

                if (xpath == null || xpath._Collection != _Collection)
                {
                    return(false);
                }
                _Index     = xpath._Index;
                _NameTable = xpath._NameTable;
                _Value     = xpath._Value;
                return(true);
            }
示例#3
0
 /// <summary>
 /// Creates a new <see cref="T:System.Xml.XPath.XPathNavigator"></see> positioned at the same node as this <see cref="T:System.Xml.XPath.XPathNavigator"></see>.
 /// </summary>
 /// <returns>
 /// A new <see cref="T:System.Xml.XPath.XPathNavigator"></see> positioned at the same node as this <see cref="T:System.Xml.XPath.XPathNavigator"></see>.
 /// </returns>
 public override XPathNavigator Clone()
 {
     HttpValueXPathNavigator clone = new HttpValueXPathNavigator(_Collection);
     clone._Index = _Index;
     clone._NameTable = _NameTable;
     clone._Value = _Value;
     return clone;
 }
示例#4
0
            /// <summary>
            /// Determines whether the current <see cref="T:System.Xml.XPath.XPathNavigator"></see> is at the same position as the specified <see cref="T:System.Xml.XPath.XPathNavigator"></see>.
            /// </summary>
            /// <param name="other">The <see cref="T:System.Xml.XPath.XPathNavigator"></see> to compare to this <see cref="T:System.Xml.XPath.XPathNavigator"></see>.</param>
            /// <returns>
            /// Returns true if the two <see cref="T:System.Xml.XPath.XPathNavigator"></see> objects have the same position; otherwise, false.
            /// </returns>
            public override bool IsSamePosition(XPathNavigator other)
            {
                HttpValueXPathNavigator xpath = other as HttpValueXPathNavigator;

                return(xpath != null && xpath._Collection == _Collection && xpath._Index == _Index);
            }