2
0

LocalAppContextSwitches.cs 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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;
  5. using System.Runtime.CompilerServices;
  6. namespace System
  7. {
  8. internal static partial class LocalAppContextSwitches
  9. {
  10. private static int s_enforceJapaneseEraYearRanges;
  11. public static bool EnforceJapaneseEraYearRanges
  12. {
  13. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  14. get
  15. {
  16. return GetCachedSwitchValue("Switch.System.Globalization.EnforceJapaneseEraYearRanges", ref s_enforceJapaneseEraYearRanges);
  17. }
  18. }
  19. private static int s_formatJapaneseFirstYearAsANumber;
  20. public static bool FormatJapaneseFirstYearAsANumber
  21. {
  22. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  23. get
  24. {
  25. return GetCachedSwitchValue("Switch.System.Globalization.FormatJapaneseFirstYearAsANumber", ref s_formatJapaneseFirstYearAsANumber);
  26. }
  27. }
  28. private static int s_enforceLegacyJapaneseDateParsing;
  29. public static bool EnforceLegacyJapaneseDateParsing
  30. {
  31. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  32. get
  33. {
  34. return GetCachedSwitchValue("Switch.System.Globalization.EnforceLegacyJapaneseDateParsing", ref s_enforceLegacyJapaneseDateParsing);
  35. }
  36. }
  37. private static int s_preserveEventListnerObjectIdentity;
  38. public static bool PreserveEventListnerObjectIdentity
  39. {
  40. [MethodImpl(MethodImplOptions.AggressiveInlining)]
  41. get
  42. {
  43. return GetCachedSwitchValue("Switch.System.Diagnostics.EventSource.PreserveEventListnerObjectIdentity", ref s_preserveEventListnerObjectIdentity);
  44. }
  45. }
  46. }
  47. }