File scoped namespaces

This commit is contained in:
ClemensFischer 2026-04-13 17:14:49 +02:00
parent c14377f976
commit 65aba44af6
152 changed files with 11962 additions and 12115 deletions

View file

@ -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;
}
}