Merge pull request #3262 from lindenlab/add_continuations_test
[mono.git] / mcs / class / Facades / System.Xml.XPath.XDocument / XDocumentExtensions.cs
1
2 // Licensed to the .NET Foundation under one or more agreements.
3 // The .NET Foundation licenses this file to you under the MIT license.
4 // See the LICENSE file in the project root for more information.
5
6 using System.Xml.Linq;
7
8 namespace System.Xml.XPath
9 {
10     public static class XDocumentExtensions
11     {
12         private class XDocumentNavigable : IXPathNavigable
13         {
14             private XNode _node;
15             public XDocumentNavigable(XNode n)
16             {
17                 _node = n;
18             }
19             public XPathNavigator CreateNavigator()
20             {
21                 return _node.CreateNavigator();
22             }
23         }
24         public static IXPathNavigable ToXPathNavigable(this XNode node)
25         {
26             return new XDocumentNavigable(node);
27         }
28     }
29 }