From: Oleg T. <he...@us...> - 2004-10-28 18:20:33
|
Update of /cvsroot/mvp-xml/Common/v1/src/XPath In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16245/v1/src/XPath Modified Files: XPathNavigatorReader.cs Added Files: IHasXPathNavigator.cs Log Message: Added IHasXPathNavigator interface and its impl for XPathNavigatorReader to be able to extract underlying XPathNavigator out of XPathNavigatorReader. --- NEW FILE: IHasXPathNavigator.cs --- #region usage using System.Xml.XPath; #endregion namespace Mvp.Xml.Common.XPath { /// <summary> /// Enables a class to return an XPathNavigator from the current context or position. /// </summary> interface IHasXPathNavigator { /// <summary> /// Returns the XPathNavigator for the current context or position. /// </summary> XPathNavigator GetNavigator(); } } Index: XPathNavigatorReader.cs =================================================================== RCS file: /cvsroot/mvp-xml/Common/v1/src/XPath/XPathNavigatorReader.cs,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- XPathNavigatorReader.cs 19 Oct 2004 07:15:11 -0000 1.2 +++ XPathNavigatorReader.cs 28 Oct 2004 18:20:19 -0000 1.3 @@ -28,7 +28,7 @@ /// See: http://weblogs.asp.net/cazzu/archive/2004/04/19/115966.aspx and /// http://weblogs.asp.net/cazzu/archive/2004/05/10/129101.aspx. /// </remarks> - public class XPathNavigatorReader : XmlTextReader, IXmlSerializable + public class XPathNavigatorReader : XmlTextReader, IXmlSerializable, IHasXPathNavigator { #region Fields @@ -735,5 +735,17 @@ } #endregion - } + + #region IHasXPathNavigator Members + + /// <summary> + /// Returns the XPathNavigator for the current position. + /// </summary> + public XPathNavigator GetNavigator() + { + return _navigator.Clone(); + } + + #endregion + } } |