Xamarin Public Jenkins (auto-signing) 0b4a830db1 Imported Upstream version 4.4.2.4
Former-commit-id: 92904c9c5915c37244316e42ba99e7b934ed7ee2
2016-07-21 09:40:10 +00:00

29 lines
798 B
C#

// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Xml.Linq;
namespace System.Xml.XPath
{
public static class XDocumentExtensions
{
private class XDocumentNavigable : IXPathNavigable
{
private XNode _node;
public XDocumentNavigable(XNode n)
{
_node = n;
}
public XPathNavigator CreateNavigator()
{
return _node.CreateNavigator();
}
}
public static IXPathNavigable ToXPathNavigable(this XNode node)
{
return new XDocumentNavigable(node);
}
}
}