diff options
Diffstat (limited to 'src/mscorlib/src/System/Runtime/Versioning')
-rw-r--r-- | src/mscorlib/src/System/Runtime/Versioning/CompatibilitySwitch.cs | 28 | ||||
-rw-r--r-- | src/mscorlib/src/System/Runtime/Versioning/TargetFrameworkId.cs | 28 |
2 files changed, 2 insertions, 54 deletions
diff --git a/src/mscorlib/src/System/Runtime/Versioning/CompatibilitySwitch.cs b/src/mscorlib/src/System/Runtime/Versioning/CompatibilitySwitch.cs index 6bf8f8cf45..3410f020be 100644 --- a/src/mscorlib/src/System/Runtime/Versioning/CompatibilitySwitch.cs +++ b/src/mscorlib/src/System/Runtime/Versioning/CompatibilitySwitch.cs @@ -7,7 +7,7 @@ using System.Runtime.CompilerServices; namespace System.Runtime.Versioning { - public static class CompatibilitySwitch + internal static class CompatibilitySwitch { /* This class contains 3 sets of api: * 1. internal apis : These apis are supposed to be used by mscorlib.dll and other assemblies which use the <runtime> section in config @@ -19,38 +19,14 @@ namespace System.Runtime.Versioning * 3. specialized apis: These apis are defined in order to retrieve a specific value defined in CLR Config. That value can have specific look-up rules * for the order and location of the config sources used. * - * These apis are for internal use only for FX assmeblies. It has not been decided if they can be used by OOB components due to EULA restrictions + * These apis are for internal use only for FX assemblies. It has not been decided if they can be used by OOB components due to EULA restrictions */ - public static bool IsEnabled(string compatibilitySwitchName) - { - return IsEnabledInternalCall(compatibilitySwitchName, true); - } - - public static string GetValue(string compatibilitySwitchName) - { - // This is used by AppContext.TryGetSwitch to check switch overrides in the Windows Quirk DB - // If this method is updated to check other locations than the DB, please ensure compat with - // the AppContext class. - return GetValueInternalCall(compatibilitySwitchName, true); - } - - internal static bool IsEnabledInternal(string compatibilitySwitchName) - { - return IsEnabledInternalCall(compatibilitySwitchName, false); - } - internal static string GetValueInternal(string compatibilitySwitchName) { return GetValueInternalCall(compatibilitySwitchName, false); } [MethodImpl(MethodImplOptions.InternalCall)] - internal static extern string GetAppContextOverridesInternalCall(); - - [MethodImpl(MethodImplOptions.InternalCall)] - private static extern bool IsEnabledInternalCall(string compatibilitySwitchName, bool onlyDB); - - [MethodImpl(MethodImplOptions.InternalCall)] private static extern string GetValueInternalCall(string compatibilitySwitchName, bool onlyDB); } } diff --git a/src/mscorlib/src/System/Runtime/Versioning/TargetFrameworkId.cs b/src/mscorlib/src/System/Runtime/Versioning/TargetFrameworkId.cs deleted file mode 100644 index 0a5e668a92..0000000000 --- a/src/mscorlib/src/System/Runtime/Versioning/TargetFrameworkId.cs +++ /dev/null @@ -1,28 +0,0 @@ -// Licensed to the .NET Foundation under one or more agreements. -// The .NET Foundation licenses this file to you under the MIT license. -// See the LICENSE file in the project root for more information. - -/*============================================================ -** -** Purpose: Describe the target framework of the application or AppDomain. -** -===========================================================*/ -using System; -using System.Runtime.CompilerServices; - -namespace System.Runtime.Versioning -{ - // What type of .NET Framework was this application compiled against? - [FriendAccessAllowed] - internal enum TargetFrameworkId - { - NotYetChecked = 0, - Unrecognized = 1, // Unknown type, such as a new SKU (like watches or cars) - Unspecified = 2, // The TargetFrameworkAttribute was created in v4.0. And apps compiled outside VS will not have this attribute. - NetFramework = 3, // Desktop - Client or Server or ServerCore. - Portable = 4, // Portable Library v1 Note: We do not expect people to build executables against portable libraries! - NetCore = 5, // .NET Core = Windows 8 Immersive and Portable Library v2+ - Silverlight = 6, // Silverlight but not the Phone - Phone = 7, // Windows Phone 7 or higher - } -} |