Headless.XPathNavigableExtensions.GetNavigator C# (CSharp) Method

GetNavigator() public static method

Gets the navigator.
/// The parameter is null. /// /// The navigator could not be created. ///
public static GetNavigator ( this navigable ) : XPathNavigator
navigable this /// The navigable. ///
return System.Xml.XPath.XPathNavigator
        public static XPathNavigator GetNavigator(this IXPathNavigable navigable)
        {
            if (navigable == null)
            {
                throw new ArgumentNullException("navigable");
            }

            var navigator = navigable.CreateNavigator();

            if (navigator == null)
            {
                throw new InvalidOperationException(Resources.XPathNavigator_NavigatorNotCreated);
            }

            return navigator;
        }