mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-04-05 14:37:01 +00:00
Use XDocument instead of XmlDocument
This commit is contained in:
parent
2c8bca205e
commit
d2638c4a6c
5 changed files with 45 additions and 99 deletions
|
|
@ -47,10 +47,11 @@
|
|||
<Reference Include="System" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Runtime.Caching" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Xaml">
|
||||
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
|
|
@ -195,7 +196,6 @@
|
|||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Tile.WPF.cs" />
|
||||
<Compile Include="XmlDocument.WPF.cs" />
|
||||
<None Include="..\..\MapControl.snk">
|
||||
<Link>MapControl.snk</Link>
|
||||
</None>
|
||||
|
|
|
|||
|
|
@ -1,24 +0,0 @@
|
|||
// XAML Map Control - https://github.com/ClemensFischer/XAML-Map-Control
|
||||
// © 2019 Clemens Fischer
|
||||
// Licensed under the Microsoft Public License (Ms-PL)
|
||||
|
||||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MapControl
|
||||
{
|
||||
internal class XmlDocument : System.Xml.XmlDocument
|
||||
{
|
||||
public static XmlDocument LoadFromUri(Uri uri)
|
||||
{
|
||||
var document = new XmlDocument();
|
||||
document.Load(uri.ToString());
|
||||
return document;
|
||||
}
|
||||
|
||||
public static Task<XmlDocument> LoadFromUriAsync(Uri uri)
|
||||
{
|
||||
return Task.Run(() => LoadFromUri(uri));
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue