LocalAppContextSwitches.cs 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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 => GetCachedSwitchValue("Switch.System.Globalization.EnforceJapaneseEraYearRanges", ref s_enforceJapaneseEraYearRanges);
  14. }
  15. private static int s_formatJapaneseFirstYearAsANumber;
  16. public static bool FormatJapaneseFirstYearAsANumber
  17. {
  18. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  19. get => GetCachedSwitchValue("Switch.System.Globalization.FormatJapaneseFirstYearAsANumber", ref s_formatJapaneseFirstYearAsANumber);
  20. }
  21. private static int s_enforceLegacyJapaneseDateParsing;
  22. public static bool EnforceLegacyJapaneseDateParsing
  23. {
  24. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  25. get => GetCachedSwitchValue("Switch.System.Globalization.EnforceLegacyJapaneseDateParsing", ref s_enforceLegacyJapaneseDateParsing);
  26. }
  27. private static int s_preserveEventListnerObjectIdentity;
  28. public static bool PreserveEventListnerObjectIdentity
  29. {
  30. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  31. get => GetCachedSwitchValue("Switch.System.Diagnostics.EventSource.PreserveEventListnerObjectIdentity", ref s_preserveEventListnerObjectIdentity);
  32. }
  33. private static int s_serializationGuard;
  34. public static bool SerializationGuard
  35. {
  36. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  37. get => GetCachedSwitchValue("Switch.System.Runtime.Serialization.SerializationGuard", ref s_serializationGuard);
  38. }
  39. }
  40. }