3 // Copyright (c) Microsoft Corporation. All rights reserved.
7 using System.Runtime.CompilerServices;
11 internal static class LocalAppContextSwitches
15 private static int _memberDescriptorEqualsReturnsFalseIfEquivalent;
16 internal const string MemberDescriptorEqualsReturnsFalseIfEquivalentName = @"Switch.System.MemberDescriptorEqualsReturnsFalseIfEquivalent";
18 public static bool MemberDescriptorEqualsReturnsFalseIfEquivalent
20 [MethodImpl(MethodImplOptions.AggressiveInlining)]
23 return LocalAppContext.GetCachedSwitchValue(MemberDescriptorEqualsReturnsFalseIfEquivalentName, ref _memberDescriptorEqualsReturnsFalseIfEquivalent);
28 #region System.Net quirks
29 private static int _dontEnableSchUseStrongCrypto;
30 internal const string DontEnableSchUseStrongCryptoName = @"Switch.System.Net.DontEnableSchUseStrongCrypto";
32 public static bool DontEnableSchUseStrongCrypto
34 [MethodImpl(MethodImplOptions.AggressiveInlining)]
37 return LocalAppContext.GetCachedSwitchValue(DontEnableSchUseStrongCryptoName, ref _dontEnableSchUseStrongCrypto);
41 private static int _allocateOverlappedOnDemand;
42 internal const string AllocateOverlappedOnDemandName = @"Switch.System.Net.WebSockets.HttpListenerAsyncEventArgs.AllocateOverlappedOnDemand";
44 public static bool AllocateOverlappedOnDemand
46 [MethodImpl(MethodImplOptions.AggressiveInlining)]
49 return LocalAppContext.GetCachedSwitchValue(AllocateOverlappedOnDemandName, ref _allocateOverlappedOnDemand);
53 private static int _dontEnableSchSendAuxRecord;
54 internal const string DontEnableSchSendAuxRecordName = @"Switch.System.Net.DontEnableSchSendAuxRecord";
56 public static bool DontEnableSchSendAuxRecord
58 [MethodImpl(MethodImplOptions.AggressiveInlining)]
61 return LocalAppContext.GetCachedSwitchValue(DontEnableSchSendAuxRecordName, ref _dontEnableSchSendAuxRecord);