3 // Copyright (c) Microsoft Corporation. All rights reserved.
7 using System
.Runtime
.CompilerServices
;
11 internal static class LocalAppContextSwitches
13 private static int _dontThrowOnInvalidSurrogatePairs
;
14 public static bool DontThrowOnInvalidSurrogatePairs
16 [MethodImpl(MethodImplOptions
.AggressiveInlining
)]
19 return LocalAppContext
.GetCachedSwitchValue(@"Switch.System.Xml.DontThrowOnInvalidSurrogatePairs", ref _dontThrowOnInvalidSurrogatePairs
);
23 private static int _ignoreEmptyKeySequences
;
24 public static bool IgnoreEmptyKeySequences
26 [MethodImpl(MethodImplOptions
.AggressiveInlining
)]
29 return LocalAppContext
.GetCachedSwitchValue(@"Switch.System.Xml.IgnoreEmptyKeySequences", ref _ignoreEmptyKeySequences
);
33 private static int _ignoreKindInUtcTimeSerialization
;
34 public static bool IgnoreKindInUtcTimeSerialization
36 [MethodImpl(MethodImplOptions
.AggressiveInlining
)]
39 return LocalAppContext
.GetCachedSwitchValue(@"Switch.System.Xml.IgnoreKindInUtcTimeSerialization", ref _ignoreKindInUtcTimeSerialization
);
43 private static int _enableTimeSpanSerialization
;
45 public static bool EnableTimeSpanSerialization
47 [MethodImpl(MethodImplOptions
.AggressiveInlining
)]
50 return LocalAppContext
.GetCachedSwitchValue(@"Switch.System.Xml.EnableTimeSpanSerialization", ref _enableTimeSpanSerialization
);