Use OperatingSystem APIs instead of RuntimeInformation in more places (#52548)
authorAlexander Köplinger <alex.koeplinger@outlook.com>
Tue, 18 May 2021 23:08:15 +0000 (01:08 +0200)
committerGitHub <noreply@github.com>
Tue, 18 May 2021 23:08:15 +0000 (01:08 +0200)
commit4a73cb9af55814e26b78f22d30bd35faa60c31a3
treea62c14bee9de04a651b4856ea8f8794384c077e5
parente426e2ce66586bc34b618c5abbfcc9ef74d5166a
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
75 files changed:
src/installer/tests/HostActivation.Tests/DependencyResolution/ResolveComponentDependencies.cs
src/installer/tests/HostActivation.Tests/FrameworkResolution/MultipleHives.cs
src/installer/tests/HostActivation.Tests/HostVersionCompatibility.cs
src/installer/tests/HostActivation.Tests/MultilevelSDKLookup.cs
src/installer/tests/HostActivation.Tests/MultilevelSharedFxLookup.cs
src/installer/tests/HostActivation.Tests/NativeHostApis.cs
src/installer/tests/HostActivation.Tests/NativeHosting/ApplicationExecution.cs
src/installer/tests/HostActivation.Tests/NativeHosting/Comhost.cs
src/installer/tests/HostActivation.Tests/NativeHosting/ComhostSideBySide.cs
src/installer/tests/HostActivation.Tests/NativeHosting/GetFunctionPointer.cs
src/installer/tests/HostActivation.Tests/NativeHosting/LoadAssemblyAndGetFunctionPointer.cs
src/installer/tests/HostActivation.Tests/NativeHosting/Nethost.cs
src/installer/tests/HostActivation.Tests/PortableAppActivation.cs
src/installer/tests/HostActivation.Tests/RegisteredInstallLocationOverride.cs
src/installer/tests/HostActivation.Tests/StandaloneAppActivation.cs
src/installer/tests/HostActivation.Tests/WindowsSpecificBehavior.cs
src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundleExtractToSpecificPath.cs
src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/BundleLocalizedApp.cs
src/installer/tests/Microsoft.NET.HostModel.Tests/AppHost.Bundle.Tests/HammerServiceTest.cs
src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.AppHost.Tests/AppHostUpdateTests.cs
src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.AppHost.Tests/AppHostUsedWithSymbolicLinks.cs
src/installer/tests/Microsoft.NET.HostModel.Tests/Microsoft.NET.HostModel.Bundle.Tests/BundlerConsistencyTests.cs
src/installer/tests/TestUtils/Command.cs
src/installer/tests/TestUtils/SymbolicLinking.cs
src/libraries/Common/src/System/Security/Cryptography/DSACng.cs
src/libraries/Common/tests/System/Net/Capability.Sockets.cs
src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/EC/EccTestBase.cs
src/libraries/Common/tests/System/Security/Cryptography/AlgorithmImplementations/ECDiffieHellman/ECDiffieHellmanTests.NistValidation.cs
src/libraries/System.Net.Http/tests/StressTests/HttpStress/StressServer.cs
src/libraries/System.Net.Security/tests/StressTests/SslStress/SslServerBase.cs
src/libraries/System.Net.Sockets/tests/FunctionalTests/CreateSocketTests.cs
src/libraries/System.Net.Sockets/tests/FunctionalTests/DualModeSocketTest.cs
src/libraries/System.Net.Sockets/tests/FunctionalTests/NetworkStreamTest.cs
src/libraries/System.Net.Sockets/tests/FunctionalTests/SocketOptionNameTest.cs
src/libraries/System.Net.Sockets/tests/FunctionalTests/UnixDomainSocketTest.cs
src/libraries/System.Security.Cryptography.X509Certificates/tests/DynamicChainTests.cs
src/tests/Common/CoreCLRTestLibrary/Utilities.cs
src/tests/Common/Coreclr.TestWrapper/CoreclrTestWrapperLib.cs
src/tests/CoreMangLib/system/runtime/interopservices/marshal/marshalsizeof1.cs
src/tests/CoreMangLib/system/runtime/interopservices/marshal/marshalsizeof2.cs
src/tests/GC/LargeMemory/memcheck.cs
src/tests/Interop/COM/Reflection/Reflection.cs
src/tests/Interop/DllImportAttribute/DllImportPath/DllImportPathTest.cs
src/tests/Interop/DllImportAttribute/ExactSpelling/ExactSpellingTest.cs
src/tests/Interop/NativeLibrary/NativeLibraryToLoad/NativeLibraryToLoad.cs
src/tests/Interop/PInvoke/Array/MarshalArrayAsField/AsByValArray/AsByValArrayTest.cs
src/tests/Interop/PInvoke/Array/MarshalArrayAsField/AsLPArray/AsLPArrayTest.cs
src/tests/Interop/PInvoke/Array/MarshalArrayAsParam/AsDefault/AsDefaultTest.cs
src/tests/Interop/PInvoke/Array/MarshalArrayAsParam/AsLPArray/AsLPArrayTest.cs
src/tests/Interop/PInvoke/AsAny/AsAnyTest.cs
src/tests/Interop/PInvoke/Decimal/DecimalTest.cs
src/tests/Interop/PInvoke/Delegate/DelegateTest.cs
src/tests/Interop/PInvoke/SizeParamIndex/PInvoke/PassingByOut/PassingByOutTest.cs
src/tests/Interop/PInvoke/SizeParamIndex/PInvoke/PassingByRef/PassingByRefTest.cs
src/tests/Interop/PInvoke/SizeParamIndex/ReversePInvoke/PassingByOut/PassingByOutTest.cs
src/tests/Interop/PInvoke/SizeParamIndex/ReversePInvoke/PassingByRef/PassingByRefTest.cs
src/tests/Interop/PrimitiveMarshalling/Bool/BoolTest.cs
src/tests/Interop/StringMarshalling/UTF8/UTF8Test.cs
src/tests/Interop/StructMarshalling/ReversePInvoke/MarshalSeqStruct/ReversePInvoke/ReversePInvokeTest_.cs
src/tests/Interop/StructPacking/StructPacking.cs
src/tests/JIT/Regression/CLR-x86-JIT/V1.2-Beta1/b103058/b103058.cs
src/tests/JIT/Regression/Dev11/External/dev11_239804/ShowLocallocAlignment.cs
src/tests/JIT/superpmi/superpmicollect.cs
src/tests/Loader/AssemblyDependencyResolver/AssemblyDependencyResolverTests/NativeDependencyTests.cs
src/tests/Loader/binding/tracing/BinderTracingTest.DefaultProbing.cs
src/tests/baseservices/callconvs/TestCallingConventions.cs
src/tests/baseservices/typeequivalence/simple/Simple.cs
src/tests/ilasm/PortablePdb/IlasmPortablePdbTester.cs
src/tests/readytorun/coreroot_determinism/Program.cs
src/tests/readytorun/r2rdump/FrameworkTests/R2RDumpTester.cs
src/tests/tracing/eventpipe/common/IpcTraceTest.cs
src/tests/tracing/eventpipe/common/IpcUtils.cs
src/tests/tracing/eventpipe/common/Reverse.cs
src/tests/tracing/eventpipe/complus_config/name_config_with_pid.cs
src/tests/tracing/eventpipe/processinfo/processinfo.cs