diff options
Diffstat (limited to 'src/mscorlib/src/System/CLRConfig.cs')
-rw-r--r-- | src/mscorlib/src/System/CLRConfig.cs | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/mscorlib/src/System/CLRConfig.cs b/src/mscorlib/src/System/CLRConfig.cs index 16c610b82b..d97922f9b9 100644 --- a/src/mscorlib/src/System/CLRConfig.cs +++ b/src/mscorlib/src/System/CLRConfig.cs @@ -7,8 +7,23 @@ using System.Runtime.Versioning; using System.Runtime.InteropServices; using System.Security; -namespace System { +namespace System +{ + // CLRConfig is mainly reading the config switch values. this is used when we cannot use the AppContext class + // one example, is using the context switch in the globalization code which require to read the switch very + // early even before the appdomain get initialized. + // In general AppContext should be used instead of CLRConfig if there is no reason prevent that. + internal class CLRConfig + { + internal static bool GetBoolValue(string switchName) + { + return GetConfigBoolValue(switchName); + } + [DllImport(JitHelpers.QCall, CharSet = CharSet.Unicode)] + [SuppressUnmanagedCodeSecurity] + private extern static bool GetConfigBoolValue(string configSwitchName); + } } // namespace System // file CLRConfig |