misc: Migrate usage of RuntimeInformation to OperatingSystem (#2901)

Very basic migration across the codebase.
This commit is contained in:
Mary 2021-12-05 00:02:30 +01:00 committed by GitHub
parent 7c9360d393
commit f39fce8f54
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 77 additions and 68 deletions

View file

@ -960,10 +960,10 @@ namespace ARMeilleure.Translation.PTC
{
uint osPlatform = 0u;
osPlatform |= (RuntimeInformation.IsOSPlatform(OSPlatform.FreeBSD) ? 1u : 0u) << 0;
osPlatform |= (RuntimeInformation.IsOSPlatform(OSPlatform.Linux) ? 1u : 0u) << 1;
osPlatform |= (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) ? 1u : 0u) << 2;
osPlatform |= (RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? 1u : 0u) << 3;
osPlatform |= (OperatingSystem.IsFreeBSD() ? 1u : 0u) << 0;
osPlatform |= (OperatingSystem.IsLinux() ? 1u : 0u) << 1;
osPlatform |= (OperatingSystem.IsMacOS() ? 1u : 0u) << 2;
osPlatform |= (OperatingSystem.IsWindows() ? 1u : 0u) << 3;
return osPlatform;
}