Update to .NET 6
This commit is contained in:
committed by
Matthias Mailänder
parent
eae6d33cd9
commit
b12c15ea9d
@@ -13,6 +13,7 @@ using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Threading.Tasks;
|
||||
using OpenRA.Mods.Common.FileFormats;
|
||||
using OpenRA.Widgets;
|
||||
@@ -472,6 +473,11 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
if (Platform.CurrentPlatform != PlatformType.Windows)
|
||||
return null;
|
||||
|
||||
// We need an extra check for the platform here to silence a warning when the registry is accessed
|
||||
// TODO: Remove this once our platform checks use the same method
|
||||
if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
|
||||
return null;
|
||||
|
||||
foreach (var prefix in source.RegistryPrefixes)
|
||||
{
|
||||
var path = Microsoft.Win32.Registry.GetValue(prefix + source.RegistryKey, source.RegistryValue, null) as string;
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace OpenRA.Mods.Common.Widgets.Logic
|
||||
|
||||
return $"&sysinfoversion={SystemInformationVersion}&"
|
||||
+ GetSystemInformation()
|
||||
.Select(kv => kv.Key + "=" + Uri.EscapeUriString(kv.Value.Value))
|
||||
.Select(kv => kv.Key + "=" + Uri.EscapeDataString(kv.Value.Value))
|
||||
.JoinWith("&");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user