289 references to TryGetSwitch
Aspire.Azure.AI.OpenAI (1)
AzureOpenAISettings.cs (1)
76if (AppContext.TryGetSwitch("OpenAI.Experimental.EnableOpenTelemetry", out var enabled))
Aspire.Azure.Messaging.EventHubs (1)
AzureMessagingEventHubsSettings.cs (1)
79if (AppContext.TryGetSwitch("Azure.Experimental.EnableActivitySource", out var enabled))
Aspire.Azure.Messaging.ServiceBus (1)
AzureMessagingServiceBusSettings.cs (1)
69if (AppContext.TryGetSwitch("Azure.Experimental.EnableActivitySource", out var enabled))
Aspire.Confluent.Kafka (1)
ConfluentKafkaCommon.cs (1)
20AppContext.TryGetSwitch(EnableAspire8ConfluentKafkaMetrics, out var value) && value;
Aspire.OpenAI (1)
OpenAISettings.cs (1)
61if (AppContext.TryGetSwitch("OpenAI.Experimental.EnableOpenTelemetry", out var enabled))
Binding.Http.IntegrationTests (1)
OperationContextTests.cs (1)
38bool asyncFlowDisabled = AppContext.TryGetSwitch("System.ServiceModel.OperationContext.DisableAsyncFlow", out bool switchEnabled) && switchEnabled;
Binding.Tcp.IntegrationTests (1)
OperationContextAsyncFlowTests.cs (1)
157var asyncFlowDisabled = AppContext.TryGetSwitch("System.ServiceModel.OperationContext.DisableAsyncFlow", out var enabled) && enabled;
Microsoft.AspNetCore.Authentication.Abstractions (1)
AuthenticationOptions.cs (1)
109_disableAutoDefaultScheme = AppContext.TryGetSwitch("Microsoft.AspNetCore.Authentication.SuppressAutoDefaultScheme", out var enabled) && enabled;
Microsoft.AspNetCore.Authorization.Policy (1)
AuthorizationMiddleware.cs (1)
184if (AppContext.TryGetSwitch(SuppressUseHttpContextAsAuthorizationResource, out var useEndpointAsResource) && useEndpointAsResource)
Microsoft.AspNetCore.Components (1)
Routing\RegexConstraintSupport.cs (1)
14AppContext.TryGetSwitch("Microsoft.AspNetCore.Components.Routing.RegexConstraintSupport", out var enabled) && enabled;
Microsoft.AspNetCore.Components.Web (1)
Routing\NavLink.cs (1)
16private static readonly bool _disableMatchAllIgnoresLeftUriPart = AppContext.TryGetSwitch(DisableMatchAllIgnoresLeftUriPartSwitchKey, out var switchValue) && switchValue;
Microsoft.AspNetCore.Components.WebView.Maui (2)
BlazorWebViewHandler.cs (1)
19 AppContext.TryGetSwitch(UseBlockingDisposalSwitch, out var enabled) && enabled;
src\BlazorWebView\src\SharedSource\HostAddressHelper.cs (1)
13 AppContext.TryGetSwitch(AppHostAddressAlways0000Switch, out var enabled) && enabled;
Microsoft.AspNetCore.Components.WebView.WindowsForms (1)
src\BlazorWebView\src\SharedSource\HostAddressHelper.cs (1)
13 AppContext.TryGetSwitch(AppHostAddressAlways0000Switch, out var enabled) && enabled;
Microsoft.AspNetCore.Components.WebView.Wpf (1)
src\BlazorWebView\src\SharedSource\HostAddressHelper.cs (1)
13 AppContext.TryGetSwitch(AppHostAddressAlways0000Switch, out var enabled) && enabled;
Microsoft.AspNetCore.DataProtection (1)
KeyManagement\KeyRingProvider.cs (1)
61AppContext.TryGetSwitch(DisableAsyncKeyRingUpdateSwitchKey, out _disableAsyncKeyRingUpdate);
Microsoft.AspNetCore.Identity (1)
SignInManager.cs (1)
399var alwaysLockout = AppContext.TryGetSwitch("Microsoft.AspNetCore.Identity.CheckPasswordSignInAlwaysResetLockoutOnSuccess", out var enabled) && enabled;
Microsoft.AspNetCore.Mvc.Abstractions (1)
ModelBinding\ModelMetadata.cs (1)
42AppContext.TryGetSwitch("Microsoft.AspNetCore.Mvc.ApiExplorer.IsEnhancedModelMetadataSupported", out var isEnhancedModelMetadataSupported) ? isEnhancedModelMetadataSupported : true;
Microsoft.AspNetCore.Mvc.ViewFeatures (1)
DefaultEditorTemplates.cs (1)
315if (AppContext.TryGetSwitch(UsePasswordValue, out var usePasswordValue) && usePasswordValue)
Microsoft.AspNetCore.OutputCaching.StackExchangeRedis (1)
RedisOutputCacheOptions.cs (1)
52AppContext.TryGetSwitch("Microsoft.AspNetCore.Caching.StackExchangeRedis.UseForceReconnect", out var value) && value;
Microsoft.AspNetCore.Server.HttpSys (1)
AsyncAcceptContext.cs (1)
20private readonly bool _logExpectationFailures = AppContext.TryGetSwitch(
Microsoft.AspNetCore.Server.IIS (1)
Core\IISHttpServer.cs (1)
292AppContext.TryGetSwitch(Latin1Suppport, out _useLatin1);
Microsoft.AspNetCore.Server.Kestrel.Core (6)
Internal\Http\HttpParser.cs (1)
38public HttpParser(bool showErrorDetails) : this(showErrorDetails, AppContext.TryGetSwitch(KestrelServerOptions.DisableHttp1LineFeedTerminatorsSwitchKey, out var disabled) && disabled)
KestrelServerOptions.cs (4)
36AppContext.TryGetSwitch(FinOnErrorSwitch, out _finOnError); 37AppContext.TryGetSwitch(CertificateFileWatchingSwitch, out _disableCertificateFileWatching); 229_enableWebTransportAndH3Datagrams = AppContext.TryGetSwitch("Microsoft.AspNetCore.Server.Kestrel.Experimental.WebTransportAndH3Datagrams", out var enabled) && enabled; 247_disableHttp1LineFeedTerminators = AppContext.TryGetSwitch(DisableHttp1LineFeedTerminatorsSwitchKey, out var disabled) && disabled;
Middleware\HttpsConnectionMiddleware.cs (1)
522var enableHttp2OnWindows81 = AppContext.TryGetSwitch(EnableWindows81Http2, out var enabled) && enabled;
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (1)
SocketTransportOptions.cs (1)
21AppContext.TryGetSwitch(FinOnErrorSwitch, out _finOnError);
Microsoft.AspNetCore.SignalR.Core (1)
Internal\DefaultHubDispatcher.cs (1)
40AppContext.TryGetSwitch("Microsoft.AspNetCore.SignalR.Hub.IsCustomAwaitableSupported", out bool customAwaitableSupport) ? customAwaitableSupport : true;
Microsoft.CSharp (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
Microsoft.Extensions.Caching.Memory (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
Microsoft.Extensions.Caching.StackExchangeRedis (1)
RedisCacheOptions.cs (1)
57AppContext.TryGetSwitch("Microsoft.AspNetCore.Caching.StackExchangeRedis.UseForceReconnect", out var value) && value;
Microsoft.Extensions.Configuration (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
Microsoft.Extensions.Configuration.Abstractions (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
Microsoft.Extensions.Configuration.Binder (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
Microsoft.Extensions.Configuration.CommandLine (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
Microsoft.Extensions.Configuration.FileExtensions (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
Microsoft.Extensions.Configuration.Ini (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
Microsoft.Extensions.Configuration.Json (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
Microsoft.Extensions.Configuration.UserSecrets (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
Microsoft.Extensions.Configuration.Xml (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
Microsoft.Extensions.DependencyInjection (3)
ServiceProvider.cs (2)
39AppContext.TryGetSwitch("Microsoft.Extensions.DependencyInjection.VerifyOpenGenericServiceTrimmability", out bool verifyOpenGenerics) ? verifyOpenGenerics : false; 43AppContext.TryGetSwitch("Microsoft.Extensions.DependencyInjection.DisableDynamicEngine", out bool disableDynamicEngine) ? disableDynamicEngine : false;
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
Microsoft.Extensions.DependencyInjection.Abstractions (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
Microsoft.Extensions.DependencyModel (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
Microsoft.Extensions.Diagnostics (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
Microsoft.Extensions.Diagnostics.Abstractions (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
Microsoft.Extensions.FileProviders.Abstractions (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
Microsoft.Extensions.FileProviders.Physical (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
Microsoft.Extensions.FileSystemGlobbing (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
Microsoft.Extensions.Hosting (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
Microsoft.Extensions.Hosting.Abstractions (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
Microsoft.Extensions.Http (2)
Logging\LogHelper.cs (1)
76if (AppContext.TryGetSwitch("System.Net.Http.DisableUriRedaction", out bool value))
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
Microsoft.Extensions.Logging (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
Microsoft.Extensions.Logging.Abstractions (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
Microsoft.Extensions.Logging.Configuration (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
Microsoft.Extensions.Logging.Console (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
Microsoft.Extensions.Logging.Generators (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
Microsoft.Extensions.Options (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
Microsoft.Extensions.Options.SourceGeneration (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
Microsoft.Extensions.Primitives (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
Microsoft.Interop.ComInterfaceGenerator (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
Microsoft.Interop.JavaScript.JSImportGenerator (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
Microsoft.Interop.LibraryImportGenerator (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
Microsoft.Interop.LibraryImportGenerator.Downlevel (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
Microsoft.Interop.SourceGeneration (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
Microsoft.Maui (8)
Handlers\HybridWebView\HybridWebViewHandler.cs (1)
100 AppContext.TryGetSwitch(InvokeJavaScriptThrowsExceptionsSwitch, out var enabled) && enabled;
RuntimeFeature.cs (7)
31 AppContext.TryGetSwitch("Microsoft.Maui.RuntimeFeature.IsIVisualAssemblyScanningEnabled", out bool isEnabled) 40 => AppContext.TryGetSwitch("Microsoft.Maui.RuntimeFeature.IsShellSearchResultsRendererDisplayMemberNameSupported", out bool isSupported) 49 AppContext.TryGetSwitch("Microsoft.Maui.RuntimeFeature.IsQueryPropertyAttributeSupported", out bool isSupported) 58 AppContext.TryGetSwitch("Microsoft.Maui.RuntimeFeature.IsImplicitCastOperatorsUsageViaReflectionSupported", out bool isSupported) 66 AppContext.TryGetSwitch("Microsoft.Maui.RuntimeFeature.AreBindingInterceptorsSupported", out bool areSupported) 74 AppContext.TryGetSwitch("Microsoft.Maui.RuntimeFeature.IsXamlCBindingWithSourceCompilationEnabled", out bool areSupported) 84 AppContext.TryGetSwitch("Microsoft.Maui.RuntimeFeature.IsHybridWebViewSupported", out bool isSupported)
Microsoft.Win32.Registry (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
Microsoft.Win32.Registry.AccessControl (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
Microsoft.Win32.SystemEvents (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
PresentationBuildTasks (1)
src\Microsoft.DotNet.Wpf\src\Common\src\System\LocalAppContext.cs (1)
43if (AppContext.TryGetSwitch(switchName, out bool isEnabledCentrally))
PresentationCore (2)
MS\Internal\CoreAppContextSwitches.cs (1)
350AppContext.TryGetSwitch(DisableDirtyRectanglesSwitchName, out disableDirtyRectangles);
src\Microsoft.DotNet.Wpf\src\Common\src\System\LocalAppContext.cs (1)
43if (AppContext.TryGetSwitch(switchName, out bool isEnabledCentrally))
PresentationFramework (4)
src\Microsoft.DotNet.Wpf\src\Common\src\System\LocalAppContext.cs (1)
43if (AppContext.TryGetSwitch(switchName, out bool isEnabledCentrally))
System\Windows\Controls\DataGridCell.cs (2)
45AppContext.TryGetSwitch("System.Windows.Controls.DisableDataGridKeyboardSort", out IsDataGridKeyboardSortDisabled); 46AppContext.TryGetSwitch("System.Windows.Controls.OptOutOfGridColumnResizeUsingKeyboard", out OptOutOfGridColumnResizeUsingKeyboard);
System\Windows\Controls\ListBox.cs (1)
79AppContext.TryGetSwitch("System.Windows.Controls.OptOutOfGridColumnResizeUsingKeyboard", out OptOutOfGridColumnResizeUsingKeyboard);
System.CodeDom (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Collections (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Collections.Concurrent (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Collections.Immutable (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Collections.NonGeneric (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Collections.Specialized (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.ComponentModel.Annotations (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.ComponentModel.Composition (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.ComponentModel.Composition.Registration (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.ComponentModel.EventBasedAsync (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.ComponentModel.Primitives (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.ComponentModel.TypeConverter (5)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System\ComponentModel\Design\DesigntimeLicenseContextSerializer.cs (1)
21private static bool EnableUnsafeBinaryFormatterInDesigntimeLicenseContextSerialization { get; } = AppContext.TryGetSwitch("System.ComponentModel.TypeConverter.EnableUnsafeBinaryFormatterInDesigntimeLicenseContextSerialization", out bool isEnabled) ? isEnabled : false;
System\ComponentModel\Design\IDesignerHost.cs (1)
17internal static bool IsSupported => AppContext.TryGetSwitch("System.ComponentModel.Design.IDesignerHost.IsSupported", out bool isSupported) ? isSupported : true;
System\ComponentModel\TypeDescriptor.cs (2)
42internal static bool IsComObjectDescriptorSupported => AppContext.TryGetSwitch("System.ComponentModel.TypeDescriptor.IsComObjectDescriptorSupported", out bool isEnabled) ? isEnabled : true; 155AppContext.TryGetSwitch(
System.Composition.Convention (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Composition.Hosting (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Composition.Runtime (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Composition.TypedParts (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Configuration.ConfigurationManager (2)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System\Configuration\SettingsProperty.cs (1)
8internal static bool EnableUnsafeBinaryFormatterInPropertyValueSerialization { get; } = AppContext.TryGetSwitch("System.Configuration.ConfigurationManager.EnableUnsafeBinaryFormatterInPropertyValueSerialization", out bool isEnabled) ? isEnabled : false;
System.Console (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Data.Common (5)
src\libraries\Common\src\System\LocalAppContextSwitches.Common.cs (3)
15AppContext.TryGetSwitch(switchName, out switchValue); 30bool hasSwitch = AppContext.TryGetSwitch(switchName, out bool isSwitchEnabled); 36AppContext.TryGetSwitch("TestSwitch.LocalAppContext.DisableCaching", out bool disableCaching);
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System\Data\DataSet.cs (1)
84internal static bool XmlSerializationIsSupported => AppContext.TryGetSwitch("System.Data.DataSet.XmlSerializationIsSupported", out bool isSupported) ? isSupported : true;
System.Data.Odbc (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Data.OleDb (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Diagnostics.DiagnosticSource (5)
src\libraries\Common\src\System\LocalAppContextSwitches.Common.cs (3)
15AppContext.TryGetSwitch(switchName, out switchValue); 30bool hasSwitch = AppContext.TryGetSwitch(switchName, out bool isSwitchEnabled); 36AppContext.TryGetSwitch("TestSwitch.LocalAppContext.DisableCaching", out bool disableCaching);
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System\Diagnostics\Metrics\Meter.cs (1)
28AppContext.TryGetSwitch("System.Diagnostics.Metrics.Meter.IsSupported", out bool isSupported) ? isSupported : true;
System.Diagnostics.EventLog (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Diagnostics.FileVersionInfo (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Diagnostics.PerformanceCounter (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Diagnostics.Process (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Diagnostics.TextWriterTraceListener (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Diagnostics.TraceSource (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.DirectoryServices (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.DirectoryServices.AccountManagement (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.DirectoryServices.Protocols (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Drawing.Common (1)
Special\SR.cs (1)
11AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) && usingResourceKeys;
System.Drawing.Common.Tests (3)
System\Drawing\IconTests.cs (3)
572if (RemoteExecutor.IsSupported && (!AppContext.TryGetSwitch(DontSupportPngFramesInIcons, out bool isEnabled) || isEnabled)) 595if (RemoteExecutor.IsSupported && (!AppContext.TryGetSwitch(DontSupportPngFramesInIcons, out bool isEnabled) || !isEnabled)) 605if (AppContext.TryGetSwitch(DontSupportPngFramesInIcons, out bool enabled) && enabled)
System.Drawing.Primitives (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Formats.Asn1 (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Formats.Cbor (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Formats.Nrbf (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Formats.Tar (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.IO.Compression (2)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System\IO\Compression\DeflateZLib\DeflateStream.cs (1)
1123AppContext.TryGetSwitch("System.IO.Compression.UseStrictValidation", out bool strictValidation) ? strictValidation : false;
System.IO.Compression.Brotli (2)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System\IO\Compression\dec\BrotliStream.Decompress.cs (1)
238AppContext.TryGetSwitch("System.IO.Compression.UseStrictValidation", out bool strictValidation) ? strictValidation : false;
System.IO.Compression.ZipFile (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.IO.FileSystem.AccessControl (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.IO.FileSystem.DriveInfo (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.IO.FileSystem.Watcher (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.IO.Hashing (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.IO.IsolatedStorage (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.IO.MemoryMappedFiles (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.IO.Packaging (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.IO.Pipelines (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.IO.Pipes (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.IO.Pipes.AccessControl (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.IO.Ports (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Linq (2)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System\Linq\Enumerable.cs (1)
14internal static bool IsSizeOptimized { get; } = AppContext.TryGetSwitch("System.Linq.Enumerable.IsSizeOptimized", out bool isEnabled) ? isEnabled : false;
System.Linq.AsyncEnumerable (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Linq.Expressions (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Linq.Parallel (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Linq.Queryable (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Management (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Memory (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Memory.Data (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Net.Http (4)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System\Net\Http\SocketsHttpHandler\AuthenticationHelper.NtAuth.cs (1)
35if (AppContext.TryGetSwitch(UsePortInSpnCtxSwitch, out bool value))
System\Net\Http\SocketsHttpHandler\RuntimeSettingParser.cs (2)
18if (AppContext.TryGetSwitch(appCtxSettingName, out value)) 46if (AppContext.TryGetSwitch(appCtxSettingName, out value))
System.Net.Http.Json (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Net.Http.WinHttpHandler (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Net.HttpListener (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Net.Mail (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Net.NameResolution (2)
src\libraries\Common\src\System\Net\SocketProtocolSupportPal.cs (1)
20if (AppContext.TryGetSwitch(DisableIPv6AppCtxSwitch, out bool disabled))
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Net.NetworkInformation (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Net.Ping (2)
src\libraries\Common\src\System\Net\SocketProtocolSupportPal.cs (1)
20if (AppContext.TryGetSwitch(DisableIPv6AppCtxSwitch, out bool disabled))
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Net.Primitives (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Net.Quic (2)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System\Net\Quic\Internal\MsQuicConfiguration.Cache.cs (1)
27if (AppContext.TryGetSwitch(DisableCacheCtxSwitch, out bool value))
System.Net.Requests (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Net.Security (4)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System\Net\NegotiateAuthenticationPal.Unix.cs (1)
27AppContext.TryGetSwitch("System.Net.Security.UseManagedNtlm", out bool useManagedNtlm) ?
System\Net\Security\SslAuthenticationOptions.cs (1)
124_ = AppContext.TryGetSwitch(EnableOcspStaplingContextSwitchName, out ocspFetch);
System\Net\Security\SslStream.Protocol.cs (1)
35if (AppContext.TryGetSwitch(DisableTlsResumeCtxSwitch, out bool value))
System.Net.ServerSentEvents (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Net.Sockets (2)
src\libraries\Common\src\System\Net\SocketProtocolSupportPal.cs (1)
20if (AppContext.TryGetSwitch(DisableIPv6AppCtxSwitch, out bool disabled))
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Net.WebClient (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Net.WebHeaderCollection (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Net.WebSockets (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Net.WebSockets.Client (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Numerics.Tensors (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.ObjectModel (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Private.CoreLib (16)
src\libraries\Common\src\System\LocalAppContextSwitches.Common.cs (3)
15AppContext.TryGetSwitch(switchName, out switchValue); 30bool hasSwitch = AppContext.TryGetSwitch(switchName, out bool isSwitchEnabled); 36AppContext.TryGetSwitch("TestSwitch.LocalAppContext.DisableCaching", out bool disableCaching);
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
src\libraries\System.Private.CoreLib\src\Internal\Runtime\InteropServices\ComponentActivator.cs (1)
35private static bool InitializeIsSupported() => AppContext.TryGetSwitch("System.Runtime.InteropServices.EnableConsumingManagedCodeFromNativeHosting", out bool isSupported) ? isSupported : true;
src\libraries\System.Private.CoreLib\src\System\AppContextConfigHelper.cs (1)
11AppContext.TryGetSwitch(switchName, out bool value) ? value : defaultValue;
src\libraries\System.Private.CoreLib\src\System\AppDomain.cs (1)
165return AppContext.TryGetSwitch(value, out bool result) ? result : default(bool?);
src\libraries\System.Private.CoreLib\src\System\ComponentModel\DefaultValueAttribute.cs (1)
29internal static bool IsSupported => AppContext.TryGetSwitch("System.ComponentModel.DefaultValueAttribute.IsSupported", out bool isSupported) ? isSupported : true;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\StackTrace.cs (1)
24AppContext.TryGetSwitch("System.Diagnostics.StackTrace.IsSupported", out bool isSupported) ? isSupported : true;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (3)
284private static readonly bool AllowDuplicateSourceNames = AppContext.TryGetSwitch(DuplicateSourceNamesSwitch, out bool isEnabled) ? isEnabled : false; 290AppContext.TryGetSwitch("System.Diagnostics.Tracing.EventSource.IsSupported", out bool isSupported) ? isSupported : true; 296AppContext.TryGetSwitch("System.Diagnostics.Metrics.Meter.IsSupported", out bool isSupported) ? isSupported : true;
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (1)
144internal static bool AllowCustomResourceTypes { get; } = AppContext.TryGetSwitch("System.Resources.ResourceManager.AllowCustomResourceTypes", out bool allowReflection) ? allowReflection : true;
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\RuntimeFeature.NonNativeAot.cs (1)
17} = AppContext.TryGetSwitch("System.Runtime.CompilerServices.RuntimeFeature.IsDynamicCodeSupported", out bool isDynamicCodeSupported) ? isDynamicCodeSupported : true;
src\libraries\System.Private.CoreLib\src\System\Runtime\Serialization\SerializationInfo.SerializationGuard.cs (1)
50if (AppContext.TryGetSwitch(SwitchPrefix + switchSuffix, out bool isEnabled) && isEnabled)
src\libraries\System.Private.CoreLib\src\System\StartupHookProvider.cs (1)
22private static bool IsSupported => AppContext.TryGetSwitch("System.StartupHookProvider.IsSupported", out bool isSupported) ? isSupported : true;
System.Private.DataContractSerialization (2)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System\Runtime\Serialization\DataContract.cs (1)
2018AppContext.TryGetSwitch("Switch.System.Runtime.Serialization.DataContracts.Auto_Import_KVP", out bool autoImportKVP);
System.Private.Uri (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Private.Windows.Core (4)
System\Private\Windows\CoreAppContextSwitches.cs (2)
38bool hasSwitch = AppContext.TryGetSwitch(switchName, out bool isSwitchEnabled); 44AppContext.TryGetSwitch("TestSwitch.LocalAppContext.DisableCaching", out bool disableCaching);
System\Private\Windows\FeatureSwitches.cs (1)
24!AppContext.TryGetSwitch("System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization", out bool isEnabled)
Windows\Win32\System\Com\ComHelpers.cs (1)
21= !AppContext.TryGetSwitch("System.Runtime.InteropServices.BuiltInComInterop.IsSupported", out bool supported)
System.Private.Windows.Core.TestUtilities (4)
AppContextSwitchScope.cs (4)
27if (!AppContext.TryGetSwitch(AppContextSwitchNames.LocalAppContext_DisableCaching, out bool isEnabled) 35if (!AppContext.TryGetSwitch(switchName, out _originalState)) 41if (!AppContext.TryGetSwitch(switchName, out isEnabled) || isEnabled != enable) 52if (!AppContext.TryGetSwitch(_switchName, out bool isEnabled) || isEnabled != _originalState)
System.Private.Xml (4)
src\libraries\Common\src\System\LocalAppContextSwitches.Common.cs (3)
15AppContext.TryGetSwitch(switchName, out switchValue); 30bool hasSwitch = AppContext.TryGetSwitch(switchName, out bool isSwitchEnabled); 36AppContext.TryGetSwitch("TestSwitch.LocalAppContext.DisableCaching", out bool disableCaching);
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Private.Xml.Linq (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Reflection.Context (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Reflection.DispatchProxy (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Reflection.Emit (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Reflection.Metadata (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Reflection.MetadataLoadContext (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Reflection.TypeExtensions (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Resources.Extensions (3)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
src\libraries\System.Private.CoreLib\src\System\Resources\ResourceReader.cs (1)
144internal static bool AllowCustomResourceTypes { get; } = AppContext.TryGetSwitch("System.Resources.ResourceManager.AllowCustomResourceTypes", out bool allowReflection) ? allowReflection : true;
System\Resources\Extensions\DeserializingResourceReader.cs (1)
14private static readonly bool s_useBinaryFormatter = AppContext.TryGetSwitch("System.Resources.Extensions.UseBinaryFormatter", out bool isEnabled) && isEnabled;
System.Resources.Writer (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Runtime.Caching (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Runtime.InteropServices (3)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System\Runtime\InteropServices\Marshalling\ComObject.cs (2)
20internal static bool BuiltInComSupported { get; } = AppContext.TryGetSwitch("System.Runtime.InteropServices.BuiltInComInterop.IsSupported", out bool supported) ? supported : true; 23internal static bool ComImportInteropEnabled { get; } = AppContext.TryGetSwitch("System.Runtime.InteropServices.Marshalling.EnableGeneratedComInterfaceComImportInterop", out bool enabled) ? enabled : false;
System.Runtime.InteropServices.JavaScript (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Runtime.Numerics (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Runtime.Serialization.Formatters (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Runtime.Serialization.Primitives (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Runtime.Serialization.Schema (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Security.AccessControl (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Security.Claims (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Security.Cryptography (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Security.Cryptography.Cose (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Security.Cryptography.Pkcs (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Security.Cryptography.ProtectedData (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Security.Cryptography.Xml (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Security.Permissions (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Security.Principal.Windows (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.ServiceModel.NetNamedPipe (2)
System\ServiceModel\Channels\PipeConnectionInitiator.cs (2)
68internal static bool s_useBestMatchNamedPipeUri = AppContext.TryGetSwitch(UseBestMatchNamedPipeUriString, out bool enabled) && enabled; 392internal static bool s_useSha1InPipeConnectionGetHashAlgorithm = AppContext.TryGetSwitch(UseSha1InPipeConnectionGetHashAlgorithmString, out bool enabled) && enabled;
System.ServiceModel.Syndication (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.ServiceProcess.ServiceController (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Speech (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Text.Encoding.CodePages (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Text.Encodings.Web (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Text.Json (5)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System\Text\Json\AppContextSwitchHelper.cs (3)
9AppContext.TryGetSwitch( 15AppContext.TryGetSwitch( 21AppContext.TryGetSwitch(
System\Text\Json\Serialization\JsonSerializer.Helpers.cs (1)
26AppContext.TryGetSwitch(
System.Text.Json.SourceGeneration (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Text.RegularExpressions (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Text.RegularExpressions.Generator (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Threading (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Threading.AccessControl (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Threading.Channels (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Threading.RateLimiting (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Threading.Tasks.Dataflow (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Threading.Tasks.Parallel (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Transactions.Local (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Windows.Extensions (1)
src\libraries\Common\src\System\SR.cs (1)
13private static bool GetUsingResourceKeysSwitchValue() => AppContext.TryGetSwitch("System.Resources.UseSystemResourceKeys", out bool usingResourceKeys) ? usingResourceKeys : false;
System.Windows.Forms (8)
System\Drawing\Design\UITypeEditor.cs (1)
22AppContext.TryGetSwitch("System.Drawing.Design.UITypeEditor.IsSupported", out bool isSupported)
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (1)
143AppContext.TryGetSwitch("System.Windows.Forms.ActiveXImpl.IsSupported", out bool isSupported)
System\Windows\Forms\Control.cs (2)
63AppContext.TryGetSwitch("System.Windows.Forms.Control.AreDesignTimeFeaturesSupported", out bool isEnabled) 70AppContext.TryGetSwitch("System.Windows.Forms.Control.UseComponentModelRegisteredTypes", out bool isEnabled)
System\Windows\Forms\Controls\PictureBox\PictureBox.cs (1)
25!AppContext.TryGetSwitch("System.Windows.Forms.PictureBox.UseWebRequest", out bool useWebRequest)
System\Windows\Forms\DataBinding\Binding.cs (1)
19AppContext.TryGetSwitch("System.Windows.Forms.Binding.IsSupported", out bool isSupported)
System\Windows\Forms\ImageIndexConverter.cs (1)
19AppContext.TryGetSwitch("System.Windows.Forms.ImageIndexConverter.IsSupported", out bool isSupported)
System\Windows\Forms\MDI\MDIWindowDialog.cs (1)
18AppContext.TryGetSwitch("System.Windows.Forms.MdiWindowDialog.IsSupported", out bool isSupported)
System.Windows.Forms.Primitives (3)
System\ComponentModel\TypeConverterHelper.cs (1)
14AppContext.TryGetSwitch("System.Windows.Forms.Primitives.TypeConverterHelper.UseComponentModelRegisteredTypes", out bool isEnabled)
System\LocalAppContextSwitches\LocalAppContextSwitches.cs (2)
86bool hasSwitch = AppContext.TryGetSwitch(switchName, out bool isSwitchEnabled); 92AppContext.TryGetSwitch("TestSwitch.LocalAppContext.DisableCaching", out bool disableCaching);