Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Köplinger <alex.koeplinger@outlook.com>2021-05-19 02:08:15 +0300
committerGitHub <noreply@github.com>2021-05-19 02:08:15 +0300
commit4a73cb9af55814e26b78f22d30bd35faa60c31a3 (patch)
treea62c14bee9de04a651b4856ea8f8794384c077e5 /src/tests/baseservices
parente426e2ce66586bc34b618c5abbfcc9ef74d5166a (diff)
Use OperatingSystem APIs instead of RuntimeInformation in more places (#52548)
* Use OperatingSystem APIs instead of RuntimeInformation in more places These are recommended instead of the older APIs. * PR feedback
Diffstat (limited to 'src/tests/baseservices')
-rw-r--r--src/tests/baseservices/callconvs/TestCallingConventions.cs6
-rw-r--r--src/tests/baseservices/typeequivalence/simple/Simple.cs2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/tests/baseservices/callconvs/TestCallingConventions.cs b/src/tests/baseservices/callconvs/TestCallingConventions.cs
index fe42b695610..6ad86cf135a 100644
--- a/src/tests/baseservices/callconvs/TestCallingConventions.cs
+++ b/src/tests/baseservices/callconvs/TestCallingConventions.cs
@@ -16,13 +16,13 @@ unsafe class Program
public static string GetFileName()
{
- if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+ if (OperatingSystem.IsWindows())
return $"{Name}.dll";
- if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
+ if (OperatingSystem.IsLinux())
return $"lib{Name}.so";
- if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
+ if (OperatingSystem.IsMacOS())
return $"lib{Name}.dylib";
throw new PlatformNotSupportedException();
diff --git a/src/tests/baseservices/typeequivalence/simple/Simple.cs b/src/tests/baseservices/typeequivalence/simple/Simple.cs
index fbfb5dbdb37..a65866e5805 100644
--- a/src/tests/baseservices/typeequivalence/simple/Simple.cs
+++ b/src/tests/baseservices/typeequivalence/simple/Simple.cs
@@ -216,7 +216,7 @@ public class Simple
public static int Main(string[] noArgs)
{
- if (!RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
+ if (!OperatingSystem.IsWindows())
{
return 100;
}