mirror of
https://github.com/ClemensFischer/XAML-Map-Control.git
synced 2026-05-07 13:37:47 +00:00
File scoped namespaces
This commit is contained in:
parent
c14377f976
commit
65aba44af6
152 changed files with 11962 additions and 12115 deletions
|
|
@ -2,18 +2,17 @@
|
|||
using System.Threading.Tasks;
|
||||
using System.Xml.Linq;
|
||||
|
||||
namespace MapControl
|
||||
namespace MapControl;
|
||||
|
||||
internal static class XDocument
|
||||
{
|
||||
internal static class XDocument
|
||||
public static async Task<XElement> LoadRootElementAsync(Stream stream)
|
||||
{
|
||||
public static async Task<XElement> LoadRootElementAsync(Stream stream)
|
||||
{
|
||||
#if NETFRAMEWORK
|
||||
var document = await Task.Run(() => System.Xml.Linq.XDocument.Load(stream, LoadOptions.None));
|
||||
var document = await Task.Run(() => System.Xml.Linq.XDocument.Load(stream, LoadOptions.None));
|
||||
#else
|
||||
var document = await System.Xml.Linq.XDocument.LoadAsync(stream, LoadOptions.None, System.Threading.CancellationToken.None);
|
||||
var document = await System.Xml.Linq.XDocument.LoadAsync(stream, LoadOptions.None, System.Threading.CancellationToken.None);
|
||||
#endif
|
||||
return document.Root;
|
||||
}
|
||||
return document.Root;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue