LocalAppContextSwitches.cs 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. // Licensed to the .NET Foundation under one or more agreements.
  2. // The .NET Foundation licenses this file to you under the MIT license.
  3. // See the LICENSE file in the project root for more information.
  4. using System.Runtime.CompilerServices;
  5. namespace System
  6. {
  7. internal static partial class LocalAppContextSwitches
  8. {
  9. private static int s_enforceJapaneseEraYearRanges;
  10. public static bool EnforceJapaneseEraYearRanges
  11. {
  12. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  13. get
  14. {
  15. return GetCachedSwitchValue("Switch.System.Globalization.EnforceJapaneseEraYearRanges", ref s_enforceJapaneseEraYearRanges);
  16. }
  17. }
  18. private static int s_formatJapaneseFirstYearAsANumber;
  19. public static bool FormatJapaneseFirstYearAsANumber
  20. {
  21. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  22. get
  23. {
  24. return GetCachedSwitchValue("Switch.System.Globalization.FormatJapaneseFirstYearAsANumber", ref s_formatJapaneseFirstYearAsANumber);
  25. }
  26. }
  27. private static int s_enforceLegacyJapaneseDateParsing;
  28. public static bool EnforceLegacyJapaneseDateParsing
  29. {
  30. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  31. get
  32. {
  33. return GetCachedSwitchValue("Switch.System.Globalization.EnforceLegacyJapaneseDateParsing", ref s_enforceLegacyJapaneseDateParsing);
  34. }
  35. }
  36. private static int s_preserveEventListnerObjectIdentity;
  37. public static bool PreserveEventListnerObjectIdentity
  38. {
  39. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  40. get
  41. {
  42. return GetCachedSwitchValue("Switch.System.Diagnostics.EventSource.PreserveEventListnerObjectIdentity", ref s_preserveEventListnerObjectIdentity);
  43. }
  44. }
  45. private static int s_serializationGuard;
  46. public static bool SerializationGuard
  47. {
  48. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  49. get
  50. {
  51. return GetCachedSwitchValue("Switch.System.Runtime.Serialization.SerializationGuard", ref s_serializationGuard);
  52. }
  53. }
  54. }
  55. }