Merge pull request #3213 from henricm/fix-for-win-securestring-to-bstr
[mono.git] / mcs / class / referencesource / System / sys / LocalAppContextSwitches.cs
1 // ==++==
2 // 
3 //   Copyright (c) Microsoft Corporation.  All rights reserved.
4 // 
5 // ==--==
6 using System;
7 using System.Runtime.CompilerServices;
8
9 namespace System
10 {
11     internal static class LocalAppContextSwitches
12     {
13
14         #region System quirks
15         private static int _memberDescriptorEqualsReturnsFalseIfEquivalent;
16         internal const string MemberDescriptorEqualsReturnsFalseIfEquivalentName = @"Switch.System.MemberDescriptorEqualsReturnsFalseIfEquivalent";
17
18         public static bool MemberDescriptorEqualsReturnsFalseIfEquivalent
19         {
20             [MethodImpl(MethodImplOptions.AggressiveInlining)]
21             get
22             {
23                 return LocalAppContext.GetCachedSwitchValue(MemberDescriptorEqualsReturnsFalseIfEquivalentName, ref _memberDescriptorEqualsReturnsFalseIfEquivalent);
24             }
25         }
26         #endregion
27
28         #region System.Net quirks
29         private static int _dontEnableSchUseStrongCrypto;
30         internal const string DontEnableSchUseStrongCryptoName = @"Switch.System.Net.DontEnableSchUseStrongCrypto";
31
32         public static bool DontEnableSchUseStrongCrypto
33         {
34             [MethodImpl(MethodImplOptions.AggressiveInlining)]
35             get
36             {
37                 return LocalAppContext.GetCachedSwitchValue(DontEnableSchUseStrongCryptoName, ref _dontEnableSchUseStrongCrypto);
38             }
39         }
40
41         private static int _allocateOverlappedOnDemand;
42         internal const string AllocateOverlappedOnDemandName = @"Switch.System.Net.WebSockets.HttpListenerAsyncEventArgs.AllocateOverlappedOnDemand";
43
44         public static bool AllocateOverlappedOnDemand
45         {
46             [MethodImpl(MethodImplOptions.AggressiveInlining)]
47             get
48             {
49                 return LocalAppContext.GetCachedSwitchValue(AllocateOverlappedOnDemandName, ref _allocateOverlappedOnDemand);
50             }
51         }
52
53         private static int _dontEnableSchSendAuxRecord;
54         internal const string DontEnableSchSendAuxRecordName = @"Switch.System.Net.DontEnableSchSendAuxRecord";
55
56         public static bool DontEnableSchSendAuxRecord
57         {
58             [MethodImpl(MethodImplOptions.AggressiveInlining)]
59             get
60             {
61                 return LocalAppContext.GetCachedSwitchValue(DontEnableSchSendAuxRecordName, ref _dontEnableSchSendAuxRecord);
62             }
63         }
64         #endregion
65     }
66 }