2 instantiations of OperatingSystem
System.Private.CoreLib (2)
src\libraries\System.Private.CoreLib\src\System\Environment.OSVersion.Unix.cs (1)
27return new OperatingSystem(PlatformID.Unix, new Version(major, minor, build, revision));
src\libraries\System.Private.CoreLib\src\System\OperatingSystem.cs (1)
82public object Clone() => new OperatingSystem(_platform, _version, _servicePack);
664 references to OperatingSystem
Aspire.Dashboard.Tests (2)
tests\Shared\Playwright\PlaywrightProvider.cs (1)
28if (OperatingSystem.IsMacOS() && string.IsNullOrEmpty(browserPath))
tests\Shared\TestCertificateLoader.cs (1)
13private static readonly Mutex? s_importPfxMutex = OperatingSystem.IsWindows()
Aspire.EndToEnd.Tests (1)
tests\Shared\Playwright\PlaywrightProvider.cs (1)
28if (OperatingSystem.IsMacOS() && string.IsNullOrEmpty(browserPath))
Aspire.Hosting (3)
Dcp\DcpHost.cs (1)
230if (OperatingSystem.IsWindows())
Dcp\Process\ProcessUtil.cs (1)
143if (OperatingSystem.IsWindows())
src\Shared\SecretsStore.cs (1)
64if (!OperatingSystem.IsWindows())
Aspire.Hosting.Azure (2)
Provisioning\Internal\BicepCompiler.cs (1)
82if (OperatingSystem.IsWindows())
src\Aspire.Hosting\Dcp\Process\ProcessUtil.cs (1)
143if (OperatingSystem.IsWindows())
Aspire.Hosting.Containers.Tests (2)
ContainerResourceTests.cs (2)
223var basePath = OperatingSystem.IsWindows() ? @"C:\root\volumes" : "/root/volumes"; 284var appHostPath = OperatingSystem.IsWindows() ? @"C:\projects\apphost" : "/projects/apphost";
Aspire.Hosting.Garnet.Tests (1)
GarnetFunctionalTests.cs (1)
130if (!OperatingSystem.IsWindows())
Aspire.Hosting.Kafka.Tests (1)
KafkaFunctionalTests.cs (1)
141if (!OperatingSystem.IsWindows())
Aspire.Hosting.MongoDB.Tests (1)
MongoDbFunctionalTests.cs (1)
286if (!OperatingSystem.IsWindows())
Aspire.Hosting.MySql (1)
MySqlBuilderExtensions.cs (1)
271if (!OperatingSystem.IsWindows())
Aspire.Hosting.Nats.Tests (1)
AddNatsTests.cs (1)
131var path = OperatingSystem.IsWindows() ? @"C:\tmp\dev-data" : "/tmp/dev-data";
Aspire.Hosting.Oracle.Tests (2)
OracleFunctionalTests.cs (2)
116if (!OperatingSystem.IsWindows()) 265if (!OperatingSystem.IsWindows())
Aspire.Hosting.Python (1)
VirtualEnvironment.cs (1)
19if(OperatingSystem.IsWindows())
Aspire.Hosting.Python.Tests (7)
AddPythonAppTests.cs (7)
152if (OperatingSystem.IsWindows()) 186if (OperatingSystem.IsWindows()) 227if (OperatingSystem.IsWindows()) 261OperatingSystem.IsWindows() ? "Scripts" : "bin", 262OperatingSystem.IsWindows() ? "python.exe" : "python" 313OperatingSystem.IsWindows() ? "Scripts" : "bin", 314OperatingSystem.IsWindows() ? "pip.exe" : "pip"
Aspire.Hosting.Redis.Tests (1)
RedisFunctionalTests.cs (1)
463if (!OperatingSystem.IsWindows())
Aspire.Hosting.SqlServer (1)
SqlServerBuilderExtensions.cs (1)
173if (!OperatingSystem.IsWindows())
Aspire.Hosting.SqlServer.Tests (1)
SqlServerFunctionalTests.cs (1)
160if (!OperatingSystem.IsWindows())
Aspire.Hosting.Tests (6)
Dcp\DcpHostNotificationTests.cs (6)
49var dcpOptions = Options.Create(new DcpOptions { ContainerRuntime = "docker", CliPath = OperatingSystem.IsWindows() ? "cmd.exe" : "/bin/sh" }); 98var dcpOptions = Options.Create(new DcpOptions { ContainerRuntime = "docker", CliPath = OperatingSystem.IsWindows() ? "cmd.exe" : "/bin/sh" }); 153var dcpOptions = Options.Create(new DcpOptions { ContainerRuntime = "docker", CliPath = OperatingSystem.IsWindows() ? "cmd.exe" : "/bin/sh" }); 208var dcpOptions = Options.Create(new DcpOptions { ContainerRuntime = "podman", CliPath = OperatingSystem.IsWindows() ? "cmd.exe" : "/bin/sh" }); 258var dcpOptions = Options.Create(new DcpOptions { ContainerRuntime = "docker", CliPath = OperatingSystem.IsWindows() ? "cmd.exe" : "/bin/sh" }); 322var dcpOptions = Options.Create(new DcpOptions { ContainerRuntime = "docker", CliPath = OperatingSystem.IsWindows() ? "cmd.exe" : "/bin/sh" });
Aspire.Playground.Tests (7)
tests\Aspire.TestUtilities\FileUtil.cs (1)
22if (OperatingSystem.IsWindows())
tests\Aspire.TestUtilities\PlatformDetection.cs (3)
15public static bool IsWindows => OperatingSystem.IsWindows(); 16public static bool IsLinux => OperatingSystem.IsLinux(); 17public static bool IsMacOS => OperatingSystem.IsMacOS();
tests\Aspire.TestUtilities\RequiresDockerAttribute.cs (1)
23OperatingSystem.IsLinux() || !PlatformDetection.IsRunningOnCI; // non-linux on CI does not support docker
tests\Aspire.TestUtilities\RequiresPlaywrightAttribute.cs (1)
20|| !OperatingSystem.IsLinux() // always supported on !linux on CI
tests\Aspire.TestUtilities\RequiresSSLCertificateAttribute.cs (1)
12public static bool IsSupported => OperatingSystem.IsLinux() || !PlatformDetection.IsRunningOnCI;
Aspire.Templates.Tests (1)
tests\Shared\Playwright\PlaywrightProvider.cs (1)
28if (OperatingSystem.IsMacOS() && string.IsNullOrEmpty(browserPath))
Aspire.TestUtilities (7)
FileUtil.cs (1)
22if (OperatingSystem.IsWindows())
PlatformDetection.cs (3)
15public static bool IsWindows => OperatingSystem.IsWindows(); 16public static bool IsLinux => OperatingSystem.IsLinux(); 17public static bool IsMacOS => OperatingSystem.IsMacOS();
RequiresDockerAttribute.cs (1)
23OperatingSystem.IsLinux() || !PlatformDetection.IsRunningOnCI; // non-linux on CI does not support docker
RequiresPlaywrightAttribute.cs (1)
20|| !OperatingSystem.IsLinux() // always supported on !linux on CI
RequiresSSLCertificateAttribute.cs (1)
12public static bool IsSupported => OperatingSystem.IsLinux() || !PlatformDetection.IsRunningOnCI;
dotnet-dev-certs (2)
src\Shared\CertificateGeneration\CertificateManager.cs (2)
46public static CertificateManager Instance { get; } = OperatingSystem.IsWindows() ? 50OperatingSystem.IsMacOS() ?
dotnet-user-jwts (1)
Helpers\JwtAuthenticationSchemeSettings.cs (1)
56if (!OperatingSystem.IsWindows())
HelixTestRunner (2)
ProcessUtil.cs (2)
56if (OperatingSystem.IsMacOS()) 186if (!OperatingSystem.IsWindows())
HttpClientApp (2)
src\Shared\TestResources.cs (2)
16private static readonly Mutex importPfxMutex = OperatingSystem.IsWindows() ? 47if (OperatingSystem.IsWindows())
IIS.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresIISAttribute.cs (1)
41if (!OperatingSystem.IsWindows())
IIS.LongTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresIISAttribute.cs (1)
41if (!OperatingSystem.IsWindows())
IIS.NewHandler.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresIISAttribute.cs (1)
41if (!OperatingSystem.IsWindows())
IIS.NewShim.FunctionalTests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresIISAttribute.cs (1)
41if (!OperatingSystem.IsWindows())
IIS.ShadowCopy.Tests (1)
src\Servers\IIS\IIS\test\Common.FunctionalTests\Infrastructure\RequiresIISAttribute.cs (1)
41if (!OperatingSystem.IsWindows())
InMemory.FunctionalTests (6)
src\Servers\Kestrel\shared\test\CertHelper.cs (3)
124if (OperatingSystem.IsWindows() && testName != null) 162if (OperatingSystem.IsWindows()) 183if (OperatingSystem.IsAndroid())
src\Servers\Kestrel\shared\test\CertificateAuthority.cs (1)
571writer.WriteGeneralizedTime(revokedTime, omitFractionalSeconds: OperatingSystem.IsAndroid());
src\Shared\TestResources.cs (2)
16private static readonly Mutex importPfxMutex = OperatingSystem.IsWindows() ? 47if (OperatingSystem.IsWindows())
Interop.FunctionalTests (5)
H2SpecCommands.cs (3)
55if (OperatingSystem.IsWindows()) 59else if (OperatingSystem.IsLinux()) 65else if (OperatingSystem.IsMacOS())
src\Shared\TestResources.cs (2)
16private static readonly Mutex importPfxMutex = OperatingSystem.IsWindows() ? 47if (OperatingSystem.IsWindows())
InteropTests (1)
src\Shared\Process\ProcessExtensions.cs (1)
21if (OperatingSystem.IsWindows())
Kestrel.SampleApp (1)
Startup.cs (1)
91if (!OperatingSystem.IsMacOS())
Microsoft.AspNetCore (1)
WebApplicationBuilder.cs (1)
259if (!OperatingSystem.IsWindows() || !string.Equals(cwd, System.Environment.SystemDirectory, StringComparison.OrdinalIgnoreCase))
Microsoft.AspNetCore.Authentication.Negotiate (1)
NegotiateHandler.cs (1)
323if (OperatingSystem.IsWindows() && identity is WindowsIdentity winIdentity)
Microsoft.AspNetCore.Components (4)
ElementReference.cs (1)
53if (OperatingSystem.IsBrowser())
Routing\RouteTableFactory.cs (1)
119if (!OperatingSystem.IsBrowser() || RegexConstraintSupport.IsEnabled)
src\Components\Shared\src\RootTypeCache.cs (1)
54if (OperatingSystem.IsBrowser())
src\Http\Routing\src\RouteOptions.cs (1)
134if (OperatingSystem.IsBrowser() && !RegexConstraintSupport.IsEnabled)
Microsoft.AspNetCore.Components.Forms (1)
EditContext.cs (1)
72public bool ShouldUseFieldIdentifiers { get; set; } = !OperatingSystem.IsBrowser();
Microsoft.AspNetCore.Components.Server (3)
ProtectedBrowserStorage\ProtectedBrowserStorage.cs (1)
31if (OperatingSystem.IsBrowser())
src\Components\Shared\src\ComponentParametersTypeCache.cs (1)
49if (OperatingSystem.IsBrowser())
src\Components\Shared\src\RootTypeCache.cs (1)
54if (OperatingSystem.IsBrowser())
Microsoft.AspNetCore.Components.Web (1)
Forms\InputBase.cs (1)
250_shouldGenerateFieldNames = !OperatingSystem.IsBrowser();
Microsoft.AspNetCore.Components.WebAssembly (5)
Hosting\WebAssemblyCultureProvider.cs (1)
61if (!OperatingSystem.IsBrowser())
Hosting\WebAssemblyHostBuilder.cs (1)
213if (OperatingSystem.IsBrowser())
Services\LazyAssemblyLoader.cs (1)
40if (OperatingSystem.IsBrowser())
src\Components\Shared\src\ComponentParametersTypeCache.cs (1)
49if (OperatingSystem.IsBrowser())
src\Components\Shared\src\RootTypeCache.cs (1)
54if (OperatingSystem.IsBrowser())
Microsoft.AspNetCore.Components.WebAssembly.Server (5)
TargetPickerUi.cs (5)
402if (OperatingSystem.IsWindows()) 407else if (OperatingSystem.IsLinux()) 412else if (OperatingSystem.IsMacOS()) 428if (OperatingSystem.IsWindows()) 433else if (OperatingSystem.IsMacOS())
Microsoft.AspNetCore.Components.WebView (2)
src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (2)
16private static readonly StringComparison _fsComparison = OperatingSystem.IsWindows() ? 311OperatingSystem.IsWindows() ? StringComparer.OrdinalIgnoreCase : StringComparer.Ordinal;
Microsoft.AspNetCore.DeveloperCertificates.XPlat (2)
src\Shared\CertificateGeneration\CertificateManager.cs (2)
46public static CertificateManager Instance { get; } = OperatingSystem.IsWindows() ? 50OperatingSystem.IsMacOS() ?
Microsoft.AspNetCore.Diagnostics.Tests (2)
ExceptionDetailsProviderTest.cs (2)
24if (!(OperatingSystem.IsLinux() || OperatingSystem.IsMacOS()))
Microsoft.AspNetCore.Hosting (2)
src\Shared\StaticWebAssets\ManifestStaticWebAssetFileProvider.cs (2)
16private static readonly StringComparison _fsComparison = OperatingSystem.IsWindows() ? 311OperatingSystem.IsWindows() ? StringComparer.OrdinalIgnoreCase : StringComparer.Ordinal;
Microsoft.AspNetCore.Hosting.Tests (10)
StaticWebAssets\ManifestStaticWebAssetsFileProviderTests.cs (10)
18var expectedResult = OperatingSystem.IsWindows(); 61exists = exists | OperatingSystem.IsWindows(); 130exists = exists | OperatingSystem.IsWindows(); 131var firstLevelCount = OperatingSystem.IsWindows() ? 1 : 2; 209exists = exists | OperatingSystem.IsWindows(); 210var firstLevelCount = OperatingSystem.IsWindows() ? 1 : 2; 366var expectedResult = OperatingSystem.IsWindows(); 507var expectedResult = OperatingSystem.IsWindows(); 557var expectedResult = OperatingSystem.IsWindows(); 614var expectedResult = OperatingSystem.IsWindows();
Microsoft.AspNetCore.Http (2)
BindingAddress.cs (2)
104if (!OperatingSystem.IsWindows()) 172if (OperatingSystem.IsWindows())
Microsoft.AspNetCore.Http.Connections (1)
Internal\HttpConnectionDispatcher.cs (1)
681if (OperatingSystem.IsWindows() && oldContext.User is WindowsPrincipal)
Microsoft.AspNetCore.Http.Connections.Client (11)
HttpConnection.cs (3)
156if (httpConnectionOptions.Transports == HttpTransportType.ServerSentEvents && OperatingSystem.IsBrowser()) 381if (transportType == HttpTransportType.ServerSentEvents && OperatingSystem.IsBrowser()) 558var isBrowser = OperatingSystem.IsBrowser();
HttpConnectionFactory.cs (1)
95if (!OperatingSystem.IsBrowser())
HttpConnectionOptions.cs (2)
49if (!OperatingSystem.IsBrowser()) 289if (OperatingSystem.IsBrowser())
Internal\Constants.cs (1)
14public static readonly string UserAgent = OperatingSystem.IsBrowser() ? "X-SignalR-User-Agent" : "User-Agent";
Internal\LongPollingTransport.cs (1)
169catch (WebException ex) when (!OperatingSystem.IsBrowser() && ex.Status == WebExceptionStatus.RequestCanceled)
Internal\WebSocketsTransport.cs (3)
95var isBrowser = OperatingSystem.IsBrowser(); 249if (OperatingSystem.IsBrowser()) 599if (!OperatingSystem.IsBrowser())
Microsoft.AspNetCore.Server.HttpSys (1)
NativeInterop\ComNetOS.cs (1)
10internal static readonly bool IsWin8orLater = OperatingSystem.IsWindowsVersionAtLeast(6, 2);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (2)
src\Shared\TestResources.cs (2)
16private static readonly Mutex importPfxMutex = OperatingSystem.IsWindows() ? 47if (OperatingSystem.IsWindows())
Microsoft.AspNetCore.Server.IIS (2)
Core\IISHttpContext.cs (1)
567private static readonly bool OsSupportsAdvancedHttp2 = OperatingSystem.IsWindowsVersionAtLeast(10, 0, 20348, 0);
WebHostBuilderIISExtensions.cs (1)
30if (OperatingSystem.IsWindows() && NativeMethods.IsAspNetCoreModuleLoaded())
Microsoft.AspNetCore.Server.IntegrationTesting (14)
ApplicationPublisher.cs (3)
105if (OperatingSystem.IsWindows()) 109if (OperatingSystem.IsLinux()) 113if (OperatingSystem.IsMacOS())
Common\DotNetCommands.cs (2)
64if (OperatingSystem.IsWindows() && Directory.Exists(archSpecificDir)) 78if (OperatingSystem.IsWindows())
Deployers\NginxDeployer.cs (2)
41if (OperatingSystem.IsLinux()) 112if (!OperatingSystem.IsWindows())
Deployers\SelfHostDeployer.cs (1)
86: (OperatingSystem.IsWindows() ? ".exe" : "");
src\Shared\Process\ProcessExtensions.cs (1)
21if (OperatingSystem.IsWindows())
TestMatrix.cs (4)
151skip = !OperatingSystem.IsWindows(); 157skip = OperatingSystem.IsWindows(); 190if (Tfm.Matches(Tfm.Net462, tfm) && !OperatingSystem.IsWindows()) 258return OperatingSystem.IsWindows() ? null : $"No {arch} available for non-Windows systems.";
xunit\IISExpressAncmSchema.cs (1)
15if (!OperatingSystem.IsWindows())
Microsoft.AspNetCore.Server.Kestrel (1)
WebHostBuilderKestrelExtensions.cs (1)
95if (OperatingSystem.IsWindows())
Microsoft.AspNetCore.Server.Kestrel.Core (5)
Internal\Certificates\CertificateConfigLoader.cs (1)
60if (OperatingSystem.IsWindows())
Internal\Infrastructure\TransportManager.cs (1)
56if (endPoint is NamedPipeEndPoint && !OperatingSystem.IsWindows())
Middleware\HttpsConnectionMiddleware.cs (1)
533if (OperatingSystem.IsWindows())
src\Shared\CertificateGeneration\CertificateManager.cs (2)
46public static CertificateManager Instance { get; } = OperatingSystem.IsWindows() ? 50OperatingSystem.IsMacOS() ?
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (7)
SniOptionsSelectorTests.cs (1)
813if (!OperatingSystem.IsWindows())
src\Servers\Kestrel\shared\test\CertHelper.cs (3)
124if (OperatingSystem.IsWindows() && testName != null) 162if (OperatingSystem.IsWindows()) 183if (OperatingSystem.IsAndroid())
src\Servers\Kestrel\shared\test\CertificateAuthority.cs (1)
571writer.WriteGeneralizedTime(revokedTime, omitFractionalSeconds: OperatingSystem.IsAndroid());
src\Shared\TestResources.cs (2)
16private static readonly Mutex importPfxMutex = OperatingSystem.IsWindows() ? 47if (OperatingSystem.IsWindows())
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (1)
src\Servers\Kestrel\Transport.Sockets\src\Internal\IOQueue.cs (1)
89if (OperatingSystem.IsWindows() || processorCount <= 32)
Microsoft.AspNetCore.Server.Kestrel.Tests (4)
src\Servers\Kestrel\shared\test\TransportTestHelpers\NamedPipesSupportedAttribute.cs (1)
9public bool IsMet => OperatingSystem.IsWindows();
src\Shared\TestResources.cs (2)
16private static readonly Mutex importPfxMutex = OperatingSystem.IsWindows() ? 47if (OperatingSystem.IsWindows())
WebHostBuilderKestrelExtensionsTests.cs (1)
84if (OperatingSystem.IsWindows())
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (2)
Internal\NamedPipeTransportFactory.cs (1)
28Debug.Assert(OperatingSystem.IsWindows(), "Named pipes transport requires a Windows operating system.");
WebHostBuilderNamedPipeExtensions.cs (1)
27if (!OperatingSystem.IsWindows())
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic.Tests (2)
src\Shared\TestResources.cs (2)
16private static readonly Mutex importPfxMutex = OperatingSystem.IsWindows() ? 47if (OperatingSystem.IsWindows())
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (4)
Client\SocketConnectionFactory.cs (1)
40var awaiterScheduler = OperatingSystem.IsWindows() ? transportScheduler : PipeScheduler.Inline;
Internal\IOQueue.cs (1)
89if (OperatingSystem.IsWindows() || processorCount <= 32)
Internal\SocketConnection.cs (2)
425(errorCode == SocketError.ConnectionAborted && OperatingSystem.IsWindows()); 433(errorCode == SocketError.InvalidArgument && !OperatingSystem.IsWindows());
Microsoft.AspNetCore.SignalR.Client.Core (1)
HubConnection.cs (1)
2499if (OperatingSystem.IsBrowser())
Microsoft.AspNetCore.SignalR.Client.FunctionalTests (1)
src\SignalR\common\Shared\TestCertificates.cs (1)
15if (OperatingSystem.IsWindows())
Microsoft.AspNetCore.SignalR.StackExchangeRedis.Tests (1)
Docker.cs (1)
17private static readonly string _exeSuffix = OperatingSystem.IsWindows() ? ".exe" : string.Empty;
Microsoft.AspNetCore.SpaProxy (3)
SpaProxyLaunchManager.cs (3)
178if (OperatingSystem.IsWindows() && !Path.HasExtension(command)) 202if (OperatingSystem.IsWindows()) 206else if (OperatingSystem.IsMacOS())
Microsoft.AspNetCore.SpaServices.Extensions (1)
Npm\NodeScriptRunner.cs (1)
33if (OperatingSystem.IsWindows())
Microsoft.AspNetCore.WebSockets.ConformanceTests (2)
Autobahn\Executable.cs (1)
11private static readonly string _exeSuffix = OperatingSystem.IsWindows() ? ".exe" : string.Empty;
AutobahnTests.cs (1)
81private bool IsWindows8OrHigher() => OperatingSystem.IsWindowsVersionAtLeast(6, 2);
Microsoft.Build.Tasks.CodeAnalysis (1)
src\Compilers\Core\MSBuildTask\RCWForCurrentContext.cs (1)
119Debug.Assert(OperatingSystem.IsWindows());
Microsoft.CodeAnalysis (2)
DiaSymReader\SymUnmanagedFactory.cs (1)
158System.Diagnostics.Debug.Assert(OperatingSystem.IsWindows());
DiaSymReader\Writer\SymUnmanagedWriterImpl.cs (1)
366Debug.Assert(OperatingSystem.IsWindows());
Microsoft.CodeAnalysis.Features (1)
Debugging\DebugInformationReaderProvider.cs (1)
96Debug.Assert(OperatingSystem.IsWindows());
Microsoft.CodeAnalysis.LanguageServer (1)
WindowsErrorReporting.cs (1)
12if (!OperatingSystem.IsWindows())
Microsoft.CodeAnalysis.LanguageServer.UnitTests (1)
WorkspaceProjectFactoryServiceTests.cs (1)
63if (OperatingSystem.IsWindows())
Microsoft.DotNet.Open.Api.Tools.Tests (1)
src\Shared\Process\ProcessExtensions.cs (1)
21if (OperatingSystem.IsWindows())
Microsoft.Extensions.AI.Evaluation.Console (1)
Commands\ReportCommand.cs (1)
101bool isInteractive = Environment.UserInteractive && (OperatingSystem.IsWindows() || !(isRedirected));
Microsoft.Extensions.ApiDescription.Client.Tests (1)
src\Shared\Process\ProcessExtensions.cs (1)
21if (OperatingSystem.IsWindows())
Microsoft.Extensions.Configuration.Xml (1)
XmlDocumentDecryptor.cs (1)
106if (OperatingSystem.IsWasi()) throw new PlatformNotSupportedException();
Microsoft.Extensions.FileProviders.Physical (10)
PhysicalFileProvider.cs (5)
167if (OperatingSystem.IsBrowser() || OperatingSystem.IsWasi() || (OperatingSystem.IsIOS() && !OperatingSystem.IsMacCatalyst()) || OperatingSystem.IsTvOS())
PhysicalFilesWatcher.cs (5)
88if (OperatingSystem.IsBrowser() || OperatingSystem.IsWasi() || (OperatingSystem.IsIOS() && !OperatingSystem.IsMacCatalyst()) || OperatingSystem.IsTvOS())
Microsoft.Extensions.Hosting (10)
HostBuilder.netcoreapp.cs (5)
14if (!OperatingSystem.IsAndroid() && !OperatingSystem.IsBrowser() && !OperatingSystem.IsWasi() && !OperatingSystem.IsIOS() && !OperatingSystem.IsTvOS())
HostingHostBuilderExtensions.cs (3)
288OperatingSystem.IsWindows(); 305if (!OperatingSystem.IsBrowser() && !OperatingSystem.IsWasi())
Internal\ConsoleLifetime.netcoreapp.cs (2)
19if (!OperatingSystem.IsWasi()) 24_sigTermRegistration = PosixSignalRegistration.Create(PosixSignal.SIGTERM, OperatingSystem.IsWindows() ? HandleWindowsShutdown : handler);
Microsoft.Extensions.Hosting.Systemd (1)
SystemdNotifier.cs (1)
45if (OperatingSystem.IsWasi()) throw new PlatformNotSupportedException();
Microsoft.Extensions.Hosting.WindowsServices (1)
WindowsServiceHelpers.cs (1)
32!OperatingSystem.IsWindows()
Microsoft.Extensions.Http (2)
MetricsFactoryHttpMessageHandlerFilter.cs (2)
36else if (!OperatingSystem.IsBrowser() && !OperatingSystem.IsWasi() && builder.PrimaryHandler is SocketsHttpHandler socketsHttpHandler)
Microsoft.Extensions.Logging.Console (3)
SimpleConsoleFormatter.cs (3)
19private static bool IsAndroidOrAppleMobile => OperatingSystem.IsAndroid() || 20OperatingSystem.IsTvOS() || 21OperatingSystem.IsIOS(); // returns true on MacCatalyst
Microsoft.Extensions.ServiceDiscovery.Dns (3)
DnsSrvServiceEndpointProviderFactory.cs (1)
54if (!OperatingSystem.IsLinux())
Resolver\DnsResolver.cs (2)
31public DnsResolver(TimeProvider timeProvider, ILogger<DnsResolver> logger) : this(timeProvider, logger, OperatingSystem.IsLinux() || OperatingSystem.IsMacOS() ? ResolvConf.GetOptions() : NetworkInfo.GetOptions())
Microsoft.VisualBasic.Core (1)
Microsoft\VisualBasic\CompilerServices\LateBinding.vb (1)
293Debug.Assert(OperatingSystem.IsWindows())
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
381[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.OperatingSystem))]
NegotiateAuthSample (1)
Startup.cs (1)
19if (OperatingSystem.IsLinux())
netstandard (1)
netstandard.cs (1)
1345[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.OperatingSystem))]
PresentationCore (2)
MS\Internal\FontCache\FamilyCollection.cs (1)
153OperatingSystem osInfo = Environment.OSVersion;
System\Windows\Interop\OperatingSystemVersionCheck.cs (1)
49OperatingSystem os = Environment.OSVersion;
SignalR.Client.FunctionalTestApp (1)
src\SignalR\common\Shared\TestCertificates.cs (1)
15if (OperatingSystem.IsWindows())
Sockets.BindTests (3)
src\Servers\Kestrel\shared\test\TransportTestHelpers\NamedPipesSupportedAttribute.cs (1)
9public bool IsMet => OperatingSystem.IsWindows();
src\Shared\TestResources.cs (2)
16private static readonly Mutex importPfxMutex = OperatingSystem.IsWindows() ? 47if (OperatingSystem.IsWindows())
Sockets.FunctionalTests (3)
src\Servers\Kestrel\shared\test\TransportTestHelpers\NamedPipesSupportedAttribute.cs (1)
9public bool IsMet => OperatingSystem.IsWindows();
src\Shared\TestResources.cs (2)
16private static readonly Mutex importPfxMutex = OperatingSystem.IsWindows() ? 47if (OperatingSystem.IsWindows())
System.ComponentModel.Composition (1)
System\ComponentModel\Composition\Hosting\DirectoryCatalog.cs (1)
26OperatingSystem.IsWindows();
System.ComponentModel.TypeConverter (2)
System\ComponentModel\TypeDescriptor.cs (1)
1762else if (OperatingSystem.IsWindows()
System\Security\Authentication\ExtendedProtection\ExtendedProtectionPolicyTypeConverter.cs (1)
24if (OperatingSystem.IsWasi()) throw new PlatformNotSupportedException(); // TODO remove with https://github.com/dotnet/runtime/pull/107185
System.Data.Odbc (3)
src\libraries\Common\src\Interop\Unix\Interop.Odbc.cs (3)
19if (OperatingSystem.IsMacOS() || OperatingSystem.IsIOS() || OperatingSystem.IsTvOS())
System.Diagnostics.DiagnosticSource (13)
System\Diagnostics\Metrics\AggregationManager.cs (2)
181if (OperatingSystem.IsBrowser()) 319if (OperatingSystem.IsBrowser())
System\Diagnostics\Metrics\MetricsEventSource.cs (1)
363if (OperatingSystem.IsWasi())
System\Diagnostics\Metrics\RuntimeMetrics.cs (10)
149if (!OperatingSystem.IsBrowser() && !OperatingSystem.IsWasi() && !OperatingSystem.IsTvOS() && !(OperatingSystem.IsIOS() && !OperatingSystem.IsMacCatalyst())) 177Debug.Assert(!OperatingSystem.IsBrowser() && !OperatingSystem.IsWasi() &&!OperatingSystem.IsTvOS() && !(OperatingSystem.IsIOS() && !OperatingSystem.IsMacCatalyst()));
System.Diagnostics.Process (6)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetHostName.cs (1)
18if (OperatingSystem.IsWasi())
src\libraries\Common\src\Interop\Unix\System.Native\Interop.MountPoints.FormatInfo.cs (1)
39if (OperatingSystem.IsLinux())
System\Diagnostics\Process.Unix.cs (3)
1133=> (OperatingSystem.IsIOS() && !OperatingSystem.IsMacCatalyst()) || OperatingSystem.IsTvOS();
System\Diagnostics\ProcessStartInfo.cs (1)
101OperatingSystem.IsWindows() ? StringComparer.OrdinalIgnoreCase : StringComparer.Ordinal));
System.Diagnostics.TextWriterTraceListener (2)
System\Diagnostics\XmlWriterTraceListener.cs (2)
253if (OperatingSystem.IsBrowser() || OperatingSystem.IsWasi() ) // Process isn't supported on Browser
System.Formats.Tar (6)
src\libraries\Common\src\System\IO\PathInternal.CaseSensitivity.cs (4)
27return !(OperatingSystem.IsWindows() || OperatingSystem.IsMacOS() || OperatingSystem.IsIOS() || OperatingSystem.IsTvOS());
System\Formats\Tar\TarEntry.cs (2)
453if (!OperatingSystem.IsWindows()) 592if (!OperatingSystem.IsWindows())
System.IO.Compression.ZipFile (6)
src\libraries\Common\src\System\IO\PathInternal.CaseSensitivity.cs (4)
27return !(OperatingSystem.IsWindows() || OperatingSystem.IsMacOS() || OperatingSystem.IsIOS() || OperatingSystem.IsTvOS());
System\IO\Compression\ZipFileExtensions.ZipArchive.Create.Unix.cs (1)
14Debug.Assert(!OperatingSystem.IsWindows());
System\IO\Compression\ZipFileExtensions.ZipArchiveEntry.Extract.cs (1)
99if (mode != UnixFileMode.None && !OperatingSystem.IsWindows())
System.IO.FileSystem.DriveInfo (6)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.MountPoints.cs (1)
42if (OperatingSystem.IsLinux())
src\libraries\Common\src\Interop\Unix\System.Native\Interop.MountPoints.FormatInfo.cs (1)
39if (OperatingSystem.IsLinux())
src\libraries\Common\src\System\IO\PathInternal.CaseSensitivity.cs (4)
27return !(OperatingSystem.IsWindows() || OperatingSystem.IsMacOS() || OperatingSystem.IsIOS() || OperatingSystem.IsTvOS());
System.IO.FileSystem.Watcher (4)
src\libraries\Common\src\System\IO\PathInternal.CaseSensitivity.cs (4)
27return !(OperatingSystem.IsWindows() || OperatingSystem.IsMacOS() || OperatingSystem.IsIOS() || OperatingSystem.IsTvOS());
System.IO.Pipes (1)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetHostName.cs (1)
18if (OperatingSystem.IsWasi())
System.IO.Ports (5)
System\IO\Ports\SerialPort.Unix.cs (5)
17return OperatingSystem.IsLinux() ? GetPortNames_Linux() 18: OperatingSystem.IsAndroid() ? GetPortNames_Linux() 19: OperatingSystem.IsMacOS() ? GetPortNames_OSX() 20: OperatingSystem.IsMacCatalyst() ? GetPortNames_OSX() 21: OperatingSystem.IsFreeBSD() ? GetPortNames_FreeBSD()
System.Linq.Parallel (2)
System\Linq\ParallelEnumerable.cs (2)
69internal static bool SinglePartitionMode => OperatingSystem.IsBrowser() || OperatingSystem.IsWasi();
System.Net.Http (7)
System\Net\Http\GlobalHttpSettings.cs (4)
51(OperatingSystem.IsLinux() && !OperatingSystem.IsAndroid()) || OperatingSystem.IsWindows() || OperatingSystem.IsMacOS());
System\Net\Http\SocketsHttpHandler\AuthenticationHelper.NtAuth.cs (1)
166if (!isProxyAuth || OperatingSystem.IsMacOS())
System\Net\Http\SocketsHttpHandler\SocketsHttpHandler.cs (2)
44public static bool IsSupported => !OperatingSystem.IsBrowser() && !OperatingSystem.IsWasi();
System.Net.Mail (1)
System\Net\Mail\SmtpNegotiateAuthenticationModule.cs (1)
37if (OperatingSystem.IsLinux())
System.Net.NameResolution (19)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetHostName.cs (1)
18if (OperatingSystem.IsWasi())
src\libraries\Common\src\System\Net\SocketProtocolSupportPal.Unix.cs (4)
17if (af == AddressFamily.Unix && (OperatingSystem.IsTvOS() || OperatingSystem.IsWasi() || (OperatingSystem.IsIOS() && !OperatingSystem.IsMacCatalyst())))
System\Net\Dns.cs (10)
42if (OperatingSystem.IsWasi()) throw new PlatformNotSupportedException(); // TODO remove with https://github.com/dotnet/runtime/pull/107185 154if (OperatingSystem.IsWasi()) throw new PlatformNotSupportedException(); // TODO remove with https://github.com/dotnet/runtime/pull/107185 165if (OperatingSystem.IsWasi()) throw new PlatformNotSupportedException(); // TODO remove with https://github.com/dotnet/runtime/pull/107185 181if (OperatingSystem.IsWasi()) throw new PlatformNotSupportedException(); // TODO remove with https://github.com/dotnet/runtime/pull/107185 257if (OperatingSystem.IsWasi()) throw new PlatformNotSupportedException(); // TODO remove with https://github.com/dotnet/runtime/pull/107185 284if (OperatingSystem.IsWasi()) throw new PlatformNotSupportedException(); // TODO remove with https://github.com/dotnet/runtime/pull/107185 294if (OperatingSystem.IsWasi()) throw new PlatformNotSupportedException(); // TODO remove with https://github.com/dotnet/runtime/pull/107185 307if (OperatingSystem.IsWasi()) throw new PlatformNotSupportedException(); // TODO remove with https://github.com/dotnet/runtime/pull/107185 353if (OperatingSystem.IsWasi()) throw new PlatformNotSupportedException(); // TODO remove with https://github.com/dotnet/runtime/pull/107185 472if (OperatingSystem.IsWasi()) throw new PlatformNotSupportedException(); // TODO remove with https://github.com/dotnet/runtime/pull/107185
System\Net\NameResolutionPal.Unix.cs (2)
21public static bool SupportsGetNameInfo => !OperatingSystem.IsWasi(); 157if (OperatingSystem.IsWasi()) throw new PlatformNotSupportedException(); // TODO remove with https://github.com/dotnet/runtime/pull/107185
System\Net\NameResolutionTelemetry.cs (2)
62public static bool AnyDiagnosticsEnabled() => !OperatingSystem.IsWasi() && (Log.IsEnabled() || NameResolutionMetrics.IsEnabled() || NameResolutionActivity.IsTracingEnabled()); 94if (OperatingSystem.IsWasi()) return;
System.Net.NetworkInformation (1)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetHostName.cs (1)
18if (OperatingSystem.IsWasi())
System.Net.Ping (15)
src\libraries\Common\src\System\Net\NetworkInformation\UnixCommandLinePing.cs (7)
101if (OperatingSystem.IsFreeBSD()) 113else if (OperatingSystem.IsMacOS()) 146if (OperatingSystem.IsFreeBSD() || OperatingSystem.IsMacOS()) 150if (ipv4 || (OperatingSystem.IsFreeBSD() && Environment.OSVersion.Version.Major > 12)) 170if (OperatingSystem.IsFreeBSD() || OperatingSystem.IsMacOS())
src\libraries\Common\src\System\Net\SocketProtocolSupportPal.Unix.cs (4)
17if (af == AddressFamily.Unix && (OperatingSystem.IsTvOS() || OperatingSystem.IsWasi() || (OperatingSystem.IsIOS() && !OperatingSystem.IsMacCatalyst())))
System\Net\NetworkInformation\Ping.RawSocket.cs (2)
22private static readonly ushort DontFragment = OperatingSystem.IsFreeBSD() ? (ushort)IPAddress.HostToNetworkOrder((short)0x4000) : (ushort)0x4000; 43iph.TotalLength = OperatingSystem.IsFreeBSD() ? (ushort)IPAddress.HostToNetworkOrder((short)totalLength) : (ushort)totalLength;
System\Net\NetworkInformation\Ping.Unix.cs (2)
18private static bool SendIpHeader => OperatingSystem.IsFreeBSD(); 19private static bool NeedsConnect => OperatingSystem.IsLinux();
System.Net.Primitives (1)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetHostName.cs (1)
18if (OperatingSystem.IsWasi())
System.Net.Quic (128)
System\Net\Quic\Internal\MsQuicApi.cs (3)
94if (OperatingSystem.IsWindows()) 194QUIC_TLS_PROVIDER provider = OperatingSystem.IsWindows() ? QUIC_TLS_PROVIDER.SCHANNEL : QUIC_TLS_PROVIDER.OPENSSL; 254private static bool IsWindowsVersionSupported() => OperatingSystem.IsWindowsVersionAtLeast(s_minWindowsVersion.Major,
System\Net\Quic\Interop\msquic.cs (125)
16using OperatingSystem = System.OperatingSystem; 30if (OperatingSystem.IsWindows()) 42if (OperatingSystem.IsWindows()) 52public static int QUIC_STATUS_SUCCESS => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_SUCCESS : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_SUCCESS : MsQuic_MacOS.QUIC_STATUS_SUCCESS; 53public static int QUIC_STATUS_PENDING => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_PENDING : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_PENDING : MsQuic_MacOS.QUIC_STATUS_PENDING; 54public static int QUIC_STATUS_CONTINUE => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_CONTINUE : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_CONTINUE : MsQuic_MacOS.QUIC_STATUS_CONTINUE; 55public static int QUIC_STATUS_OUT_OF_MEMORY => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_OUT_OF_MEMORY : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_OUT_OF_MEMORY : MsQuic_MacOS.QUIC_STATUS_OUT_OF_MEMORY; 56public static int QUIC_STATUS_INVALID_PARAMETER => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_INVALID_PARAMETER : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_INVALID_PARAMETER : MsQuic_MacOS.QUIC_STATUS_INVALID_PARAMETER; 57public static int QUIC_STATUS_INVALID_STATE => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_INVALID_STATE : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_INVALID_STATE : MsQuic_MacOS.QUIC_STATUS_INVALID_STATE; 58public static int QUIC_STATUS_NOT_SUPPORTED => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_NOT_SUPPORTED : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_NOT_SUPPORTED : MsQuic_MacOS.QUIC_STATUS_NOT_SUPPORTED; 59public static int QUIC_STATUS_NOT_FOUND => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_NOT_FOUND : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_NOT_FOUND : MsQuic_MacOS.QUIC_STATUS_NOT_FOUND; 60public static int QUIC_STATUS_BUFFER_TOO_SMALL => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_BUFFER_TOO_SMALL : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_BUFFER_TOO_SMALL : MsQuic_MacOS.QUIC_STATUS_BUFFER_TOO_SMALL; 61public static int QUIC_STATUS_HANDSHAKE_FAILURE => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_HANDSHAKE_FAILURE : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_HANDSHAKE_FAILURE : MsQuic_MacOS.QUIC_STATUS_HANDSHAKE_FAILURE; 62public static int QUIC_STATUS_ABORTED => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_ABORTED : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_ABORTED : MsQuic_MacOS.QUIC_STATUS_ABORTED; 63public static int QUIC_STATUS_ADDRESS_IN_USE => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_ADDRESS_IN_USE : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_ADDRESS_IN_USE : MsQuic_MacOS.QUIC_STATUS_ADDRESS_IN_USE; 64public static int QUIC_STATUS_INVALID_ADDRESS => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_INVALID_ADDRESS : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_INVALID_ADDRESS : MsQuic_MacOS.QUIC_STATUS_INVALID_ADDRESS; 65public static int QUIC_STATUS_CONNECTION_TIMEOUT => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_CONNECTION_TIMEOUT : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_CONNECTION_TIMEOUT : MsQuic_MacOS.QUIC_STATUS_CONNECTION_TIMEOUT; 66public static int QUIC_STATUS_CONNECTION_IDLE => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_CONNECTION_IDLE : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_CONNECTION_IDLE : MsQuic_MacOS.QUIC_STATUS_CONNECTION_IDLE; 67public static int QUIC_STATUS_UNREACHABLE => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_UNREACHABLE : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_UNREACHABLE : MsQuic_MacOS.QUIC_STATUS_UNREACHABLE; 68public static int QUIC_STATUS_INTERNAL_ERROR => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_INTERNAL_ERROR : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_INTERNAL_ERROR : MsQuic_MacOS.QUIC_STATUS_INTERNAL_ERROR; 69public static int QUIC_STATUS_CONNECTION_REFUSED => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_CONNECTION_REFUSED : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_CONNECTION_REFUSED : MsQuic_MacOS.QUIC_STATUS_CONNECTION_REFUSED; 70public static int QUIC_STATUS_PROTOCOL_ERROR => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_PROTOCOL_ERROR : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_PROTOCOL_ERROR : MsQuic_MacOS.QUIC_STATUS_PROTOCOL_ERROR; 71public static int QUIC_STATUS_VER_NEG_ERROR => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_VER_NEG_ERROR : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_VER_NEG_ERROR : MsQuic_MacOS.QUIC_STATUS_VER_NEG_ERROR; 72public static int QUIC_STATUS_TLS_ERROR => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_TLS_ERROR : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_TLS_ERROR : MsQuic_MacOS.QUIC_STATUS_TLS_ERROR; 73public static int QUIC_STATUS_USER_CANCELED => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_USER_CANCELED : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_USER_CANCELED : MsQuic_MacOS.QUIC_STATUS_USER_CANCELED; 74public static int QUIC_STATUS_ALPN_NEG_FAILURE => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_ALPN_NEG_FAILURE : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_ALPN_NEG_FAILURE : MsQuic_MacOS.QUIC_STATUS_ALPN_NEG_FAILURE; 75public static int QUIC_STATUS_STREAM_LIMIT_REACHED => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_STREAM_LIMIT_REACHED : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_STREAM_LIMIT_REACHED : MsQuic_MacOS.QUIC_STATUS_STREAM_LIMIT_REACHED; 76public static int QUIC_STATUS_ALPN_IN_USE => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_ALPN_IN_USE : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_ALPN_IN_USE : MsQuic_MacOS.QUIC_STATUS_ALPN_IN_USE; 77public static int QUIC_STATUS_CLOSE_NOTIFY => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_CLOSE_NOTIFY : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_CLOSE_NOTIFY : MsQuic_MacOS.QUIC_STATUS_CLOSE_NOTIFY; 78public static int QUIC_STATUS_BAD_CERTIFICATE => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_BAD_CERTIFICATE : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_BAD_CERTIFICATE : MsQuic_MacOS.QUIC_STATUS_BAD_CERTIFICATE; 79public static int QUIC_STATUS_UNSUPPORTED_CERTIFICATE => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_UNSUPPORTED_CERTIFICATE : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_UNSUPPORTED_CERTIFICATE : MsQuic_MacOS.QUIC_STATUS_UNSUPPORTED_CERTIFICATE; 80public static int QUIC_STATUS_REVOKED_CERTIFICATE => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_REVOKED_CERTIFICATE : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_REVOKED_CERTIFICATE : MsQuic_MacOS.QUIC_STATUS_REVOKED_CERTIFICATE; 81public static int QUIC_STATUS_EXPIRED_CERTIFICATE => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_EXPIRED_CERTIFICATE : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_EXPIRED_CERTIFICATE : MsQuic_MacOS.QUIC_STATUS_EXPIRED_CERTIFICATE; 82public static int QUIC_STATUS_UNKNOWN_CERTIFICATE => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_UNKNOWN_CERTIFICATE : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_UNKNOWN_CERTIFICATE : MsQuic_MacOS.QUIC_STATUS_UNKNOWN_CERTIFICATE; 83public static int QUIC_STATUS_REQUIRED_CERTIFICATE => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_REQUIRED_CERTIFICATE : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_REQUIRED_CERTIFICATE : MsQuic_MacOS.QUIC_STATUS_REQUIRED_CERTIFICATE; 84public static int QUIC_STATUS_CERT_EXPIRED => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_CERT_EXPIRED : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_CERT_EXPIRED : MsQuic_MacOS.QUIC_STATUS_CERT_EXPIRED; 85public static int QUIC_STATUS_CERT_UNTRUSTED_ROOT => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_CERT_UNTRUSTED_ROOT : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_CERT_UNTRUSTED_ROOT : MsQuic_MacOS.QUIC_STATUS_CERT_UNTRUSTED_ROOT; 86public static int QUIC_STATUS_CERT_NO_CERT => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_CERT_NO_CERT : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_CERT_NO_CERT : MsQuic_MacOS.QUIC_STATUS_CERT_NO_CERT; 87public static int QUIC_STATUS_ADDRESS_NOT_AVAILABLE => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_STATUS_ADDRESS_NOT_AVAILABLE : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_STATUS_ADDRESS_NOT_AVAILABLE : MsQuic_MacOS.QUIC_STATUS_ADDRESS_NOT_AVAILABLE; 89public static int QUIC_ADDRESS_FAMILY_UNSPEC => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_ADDRESS_FAMILY_UNSPEC : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_ADDRESS_FAMILY_UNSPEC : MsQuic_MacOS.QUIC_ADDRESS_FAMILY_UNSPEC; 90public static int QUIC_ADDRESS_FAMILY_INET => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_ADDRESS_FAMILY_INET : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_ADDRESS_FAMILY_INET : MsQuic_MacOS.QUIC_ADDRESS_FAMILY_INET; 91public static int QUIC_ADDRESS_FAMILY_INET6 => OperatingSystem.IsWindows() ? MsQuic_Windows.QUIC_ADDRESS_FAMILY_INET6 : (OperatingSystem.IsLinux() || OperatingSystem.IsAndroid()) ? MsQuic_Linux.QUIC_ADDRESS_FAMILY_INET6 : MsQuic_MacOS.QUIC_ADDRESS_FAMILY_INET6; 151public static bool SockaddrHasLength => OperatingSystem.IsFreeBSD() || OperatingSystem.IsIOS() || OperatingSystem.IsMacOS() || OperatingSystem.IsMacCatalyst() || OperatingSystem.IsTvOS();
System.Net.Security (16)
System\Net\NegotiateAuthenticationPal.Unix.cs (4)
29OperatingSystem.IsMacOS() || OperatingSystem.IsIOS() || OperatingSystem.IsMacCatalyst() || 30(OperatingSystem.IsLinux() && RuntimeInformation.RuntimeIdentifier.StartsWith("linux-bionic-", StringComparison.OrdinalIgnoreCase));
System\Net\Security\NegotiateAuthentication.cs (1)
173Debug.Assert(!OperatingSystem.IsTvOS(), "Server authentication is not supported on tvOS");
System\Net\Security\SslAuthenticationOptions.cs (4)
61if (!OperatingSystem.IsWindows() && !OperatingSystem.IsLinux()) 131if (!OperatingSystem.IsWindows() && !OperatingSystem.IsLinux())
System\Net\Security\SslCertificateTrust.cs (5)
24if (sendTrustInHandshake && !System.OperatingSystem.IsLinux() && !System.OperatingSystem.IsMacOS() && 26!OperatingSystem.IsWindowsVersionAtLeast(6, 2)) 51if (sendTrustInHandshake && !System.OperatingSystem.IsLinux() && !System.OperatingSystem.IsMacOS())
System\Net\Security\SslStream.IO.cs (1)
463if (OperatingSystem.IsMacOS() && _sslAuthenticationOptions.IsServer)
System\Security\Authentication\ExtendedProtection\ExtendedProtectionPolicy.cs (1)
152return OperatingSystem.IsWindows();
System.Net.Sockets (53)
src\libraries\Common\src\System\Net\SocketProtocolSupportPal.Unix.cs (4)
17if (af == AddressFamily.Unix && (OperatingSystem.IsTvOS() || OperatingSystem.IsWasi() || (OperatingSystem.IsIOS() && !OperatingSystem.IsMacCatalyst())))
System\Net\Sockets\NetworkStream.cs (6)
49if (!OperatingSystem.IsWasi() && !socket.Blocking) 121if (OperatingSystem.IsWasi()) throw new PlatformNotSupportedException(); // https://github.com/dotnet/runtime/issues/108151 132if (OperatingSystem.IsWasi()) throw new PlatformNotSupportedException(); // https://github.com/dotnet/runtime/issues/108151 148if (OperatingSystem.IsWasi()) throw new PlatformNotSupportedException(); // https://github.com/dotnet/runtime/issues/108151 159if (OperatingSystem.IsWasi()) throw new PlatformNotSupportedException(); // https://github.com/dotnet/runtime/issues/108151 688if (OperatingSystem.IsWasi()) throw new PlatformNotSupportedException(); // https://github.com/dotnet/runtime/issues/108151
System\Net\Sockets\SafeSocketHandle.Unix.cs (1)
235if (OperatingSystem.IsWasi())
System\Net\Sockets\Socket.cs (21)
48private bool _willBlock = !OperatingSystem.IsWasi(); // Desired state of the socket from the user. 49private bool _willBlockInternal = !OperatingSystem.IsWasi(); // Actual state of the socket. 67private bool _receivingPacketInformation = OperatingSystem.IsWasi(); 263internal static bool OSSupportsIPv6DualMode => !OperatingSystem.IsWasi() && OSSupportsIPv6; 265internal static bool OSSupportsThreads => !OperatingSystem.IsWasi(); 545if (OperatingSystem.IsWasi()) throw new PlatformNotSupportedException(); // TODO remove with https://github.com/dotnet/runtime/pull/107185 550if (OperatingSystem.IsWasi()) throw new PlatformNotSupportedException(); // TODO remove with https://github.com/dotnet/runtime/pull/107185 565if (OperatingSystem.IsWasi()) throw new PlatformNotSupportedException(); // TODO remove with https://github.com/dotnet/runtime/pull/107185 571if (OperatingSystem.IsWasi()) throw new PlatformNotSupportedException(); // TODO remove with https://github.com/dotnet/runtime/pull/107185 587if (OperatingSystem.IsWasi()) return new LingerOption(false, 0); 593if (OperatingSystem.IsWasi()) throw new PlatformNotSupportedException(); // TODO remove with https://github.com/dotnet/runtime/pull/107185 655if (OperatingSystem.IsWasi()) return false; 669if (OperatingSystem.IsWasi() && value) throw new PlatformNotSupportedException(); // TODO remove with https://github.com/dotnet/runtime/pull/107185 686if (OperatingSystem.IsWasi()) 706if (OperatingSystem.IsWasi() && value) throw new PlatformNotSupportedException(); // TODO remove with https://github.com/dotnet/runtime/pull/107185 727if (OperatingSystem.IsWasi() || SocketType == SocketType.Stream) 735if (OperatingSystem.IsWasi() && value) throw new PlatformNotSupportedException(); // TODO remove with https://github.com/dotnet/runtime/pull/107185 3564if (OperatingSystem.IsWasi()) return; // WASI is always set to receive PacketInformation 3594if (OperatingSystem.IsWasi() && optionName == SocketOptionName.PacketInformation) 3671if (OperatingSystem.IsWasi() && lref.Enabled) throw new PlatformNotSupportedException(); // TODO remove with https://github.com/dotnet/runtime/pull/107185 3686if (OperatingSystem.IsWasi()) return new LingerOption(false, 0);
System\Net\Sockets\Socket.Unix.cs (1)
66if (OperatingSystem.IsWasi())
System\Net\Sockets\SocketAsyncContext.Unix.cs (2)
1264private bool _isHandleNonBlocking = OperatingSystem.IsWasi(); // WASI sockets are always non-blocking, because we don't have another thread which could be blocked 1345if (OperatingSystem.IsWasi())
System\Net\Sockets\SocketPal.Unix.cs (9)
22private static readonly bool SelectOverPollIsBroken = OperatingSystem.IsMacOS() || OperatingSystem.IsIOS() || OperatingSystem.IsTvOS() || OperatingSystem.IsMacCatalyst(); 75if (!OperatingSystem.IsWasi() && addressFamily == AddressFamily.InterNetworkV6 && socketType != SocketType.Raw) 293if (OperatingSystem.IsWasi()) 385if (OperatingSystem.IsWasi()) 546if (OperatingSystem.IsWasi()) 1076if (OperatingSystem.IsWasi() && shouldBlock) throw new PlatformNotSupportedException();
System\Net\Sockets\TCPClient.cs (5)
324if (OperatingSystem.IsWasi()) throw new PlatformNotSupportedException(); // https://github.com/dotnet/runtime/issues/108151 329if (OperatingSystem.IsWasi()) throw new PlatformNotSupportedException(); // https://github.com/dotnet/runtime/issues/108151 339if (OperatingSystem.IsWasi()) throw new PlatformNotSupportedException(); // https://github.com/dotnet/runtime/issues/108151 344if (OperatingSystem.IsWasi()) throw new PlatformNotSupportedException(); // https://github.com/dotnet/runtime/issues/108151 359if (OperatingSystem.IsWasi()) throw new PlatformNotSupportedException(); // https://github.com/dotnet/runtime/issues/108151
System\Net\Sockets\TCPListener.cs (4)
194if (OperatingSystem.IsWasi() && _serverSocket!.Blocking) throw new PlatformNotSupportedException("Only use with Socket.Blocking=false on WASI"); 206if (OperatingSystem.IsWasi() && _serverSocket!.Blocking) throw new PlatformNotSupportedException("Only use with Socket.Blocking=false on WASI"); 259if (!OperatingSystem.IsWasi()) listener.Server.DualMode = true; 285Debug.Assert(OperatingSystem.IsWindows());
System.Private.CoreLib (32)
src\Internal\Runtime\InteropServices\ComponentActivator.CoreCLR.cs (1)
15if (!OperatingSystem.IsWindows())
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetHostName.cs (1)
18if (OperatingSystem.IsWasi())
src\libraries\Common\src\Interop\Unix\System.Native\Interop.MountPoints.cs (1)
42if (OperatingSystem.IsLinux())
src\libraries\Common\src\System\IO\PathInternal.CaseSensitivity.cs (4)
27return !(OperatingSystem.IsWindows() || OperatingSystem.IsMacOS() || OperatingSystem.IsIOS() || OperatingSystem.IsTvOS());
src\libraries\Common\src\System\Threading\Tasks\TaskToAsyncResult.cs (1)
35if (OperatingSystem.IsWasi()) throw new PlatformNotSupportedException(); // TODO remove with https://github.com/dotnet/runtime/pull/107185
src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeFileHandle.Unix.cs (2)
37internal static bool DisableFileLocking { get; } = OperatingSystem.IsBrowser() || OperatingSystem.IsWasi()// #40065: Emscripten does not support file locking
src\libraries\System.Private.CoreLib\src\System\Environment.cs (3)
219private static volatile OperatingSystem? s_osVersion; 221public static OperatingSystem OSVersion 225OperatingSystem? osVersion = s_osVersion;
src\libraries\System.Private.CoreLib\src\System\Environment.OSVersion.Unix.cs (2)
8private static OperatingSystem GetOSVersion() => GetOperatingSystem(Interop.Sys.GetUnixRelease()); 11private static OperatingSystem GetOperatingSystem(string release)
src\libraries\System.Private.CoreLib\src\System\Globalization\GlobalizationMode.Unix.cs (5)
41if (OperatingSystem.IsBrowser() || OperatingSystem.IsWasi() || OperatingSystem.IsAndroid() || 42OperatingSystem.IsIOS() || OperatingSystem.IsTvOS())
src\libraries\System.Private.CoreLib\src\System\Globalization\Normalization.Icu.cs (2)
202if ((OperatingSystem.IsBrowser() || OperatingSystem.IsWasi()) && (normalizationForm == NormalizationForm.FormKC || normalizationForm == NormalizationForm.FormKD))
src\libraries\System.Private.CoreLib\src\System\IO\File.cs (2)
697FileOptions options = OperatingSystem.IsWindows() ? FileOptions.SequentialScan : FileOptions.None; 1176FileOptions options = FileOptions.Asynchronous | (OperatingSystem.IsWindows() ? FileOptions.SequentialScan : FileOptions.None);
src\libraries\System.Private.CoreLib\src\System\IO\FileStreamOptions.cs (1)
137if (OperatingSystem.IsWindows())
src\libraries\System.Private.CoreLib\src\System\IO\FileSystem.Unix.cs (1)
407if (OperatingSystem.IsBrowser() && Path.EndsInDirectorySeparator(sourceFullPath) && FileExists(sourceFullPath))
src\libraries\System.Private.CoreLib\src\System\IO\Strategies\FileStreamHelpers.Unix.cs (4)
61if (OperatingSystem.IsApplePlatform() || OperatingSystem.IsFreeBSD()) 71if (OperatingSystem.IsApplePlatform() || OperatingSystem.IsFreeBSD())
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ComVariant.cs (1)
393if (vt.HasFlag(VarEnum.VT_ARRAY) && !OperatingSystem.IsWindows())
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\RuntimeInformation.cs (1)
26public static bool IsOSPlatform(OSPlatform osPlatform) => OperatingSystem.IsOSPlatform(osPlatform.Name);
System.Private.Uri (7)
System\Uri.cs (6)
2050if (!OperatingSystem.IsWindows() && InFact(Flags.UnixPath)) 2124else if (!OperatingSystem.IsWindows() && _syntax.InFact(UriSyntaxFlags.FileLikeUri) && pUriString[i - 1] == '/' && i - idx == 3) 2229else if (!OperatingSystem.IsWindows() && hostTerminator == '/' && NotAny(Flags.ImplicitFile) && InFact(Flags.UncPath) && _syntax == UriParser.FileUri) 3668if (!OperatingSystem.IsWindows() && 4392if (!OperatingSystem.IsWindows() && InFact(Flags.BackslashInPath) && _syntax.NotAny(UriSyntaxFlags.ConvertPathSlashes) && _syntax.InFact(UriSyntaxFlags.FileLikeUri) && !IsImplicitFile) 4787else if (!OperatingSystem.IsWindows() && basePart.IsUnixPath)
System\UriExt.cs (1)
61|| (!OperatingSystem.IsWindows() && InFact(Flags.UnixPath))))
System.Private.Windows.Core (10)
System\Private\Windows\OsVersion.cs (9)
16public static bool IsWindows10_1507OrGreater() => OperatingSystem.IsWindowsVersionAtLeast(major: 10, build: 10240); 23public static bool IsWindows10_1607OrGreater() => OperatingSystem.IsWindowsVersionAtLeast(major: 10, build: 14393); 30public static bool IsWindows10_1703OrGreater() => OperatingSystem.IsWindowsVersionAtLeast(major: 10, build: 15063); 37public static bool IsWindows10_1709OrGreater() => OperatingSystem.IsWindowsVersionAtLeast(major: 10, build: 16299); 44public static bool IsWindows10_18030rGreater() => OperatingSystem.IsWindowsVersionAtLeast(major: 10, build: 17134); 52public static bool IsWindows11_OrGreater() => OperatingSystem.IsWindowsVersionAtLeast(major: 10, build: 22000); 60public static bool IsWindows11_22H2OrGreater() => OperatingSystem.IsWindowsVersionAtLeast(major: 10, build: 22621); 67public static bool IsWindows8_1OrGreater() => OperatingSystem.IsWindowsVersionAtLeast(major: 6, minor: 3); 74public static bool IsWindows8OrGreater() => OperatingSystem.IsWindowsVersionAtLeast(major: 6, minor: 2);
Windows\Win32\Graphics\GdiPlus\GdiplusStartupInputEx.cs (1)
10OperatingSystem os = Environment.OSVersion;
System.Private.Windows.GdiPlus (1)
Windows\Win32\PInvokeGdiPlus.cs (1)
17if (!OperatingSystem.IsWindows())
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
408[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.OperatingSystem))]
System.Runtime.Caching (11)
System\Runtime\Caching\HostFileChangeMonitor.cs (5)
102if (OperatingSystem.IsBrowser() || OperatingSystem.IsWasi() || (OperatingSystem.IsIOS() && !OperatingSystem.IsMacCatalyst()) || OperatingSystem.IsTvOS())
System\Runtime\Caching\MemoryCache.cs (2)
44private static bool _countersSupported => !OperatingSystem.IsBrowser() && !OperatingSystem.IsWasi();
System\Runtime\Caching\MemoryCacheStatistics.cs (2)
43private static bool _configSupported => !OperatingSystem.IsBrowser() && !OperatingSystem.IsWasi();
System\Runtime\Caching\MemoryCacheStore.cs (2)
32private static bool _countersSupported => !OperatingSystem.IsBrowser() && !OperatingSystem.IsWasi();
System.Runtime.Extensions (1)
System.Runtime.Extensions.cs (1)
23[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.OperatingSystem))]
System.Runtime.InteropServices (2)
System\Runtime\InteropServices\Marshalling\ComObject.cs (1)
44if (OperatingSystem.IsWindows() && BuiltInComSupported && ComImportInteropEnabled)
System\Runtime\InteropServices\Marshalling\StrategyBasedComWrappers.cs (1)
53if (OperatingSystem.IsWindows() && RuntimeFeature.IsDynamicCodeSupported && ComObject.BuiltInComSupported && ComObject.ComImportInteropEnabled)
System.Security.Cryptography (18)
src\libraries\Common\src\System\Security\Cryptography\Helpers.cs (8)
25!OperatingSystem.IsBrowser() && !OperatingSystem.IsWasi(); 33public static bool IsDSASupported => !OperatingSystem.IsIOS() && !OperatingSystem.IsTvOS(); 42public static bool IsRC2Supported => !OperatingSystem.IsAndroid() && !OperatingSystem.IsBrowser(); 51!OperatingSystem.IsBrowser() && !OperatingSystem.IsWasi();
src\libraries\Common\src\System\Security\Cryptography\X509Certificates\X509CertificateLoader.Pkcs12.cs (2)
619OperatingSystem.IsWindows(); 741Debug.Assert(OperatingSystem.IsWindows());
System\Security\Cryptography\CryptoConfig.cs (3)
192if (!OperatingSystem.IsIOS() && 193!OperatingSystem.IsTvOS()) 200if (OperatingSystem.IsWindows())
System\Security\Cryptography\DSACryptoServiceProvider.Unix.cs (1)
35private static readonly KeySizes[] s_legalKeySizes = OperatingSystem.IsAndroid()
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (4)
800Debug.Assert(!OperatingSystem.IsBrowser()); 907Debug.Assert(!OperatingSystem.IsBrowser()); 1010Debug.Assert(!OperatingSystem.IsBrowser()); 1109Debug.Assert(!OperatingSystem.IsBrowser());
System.Security.Cryptography.Pkcs (8)
src\libraries\Common\src\System\Security\Cryptography\Helpers.cs (8)
25!OperatingSystem.IsBrowser() && !OperatingSystem.IsWasi(); 33public static bool IsDSASupported => !OperatingSystem.IsIOS() && !OperatingSystem.IsTvOS(); 42public static bool IsRC2Supported => !OperatingSystem.IsAndroid() && !OperatingSystem.IsBrowser(); 51!OperatingSystem.IsBrowser() && !OperatingSystem.IsWasi();
System.Security.Cryptography.Xml (2)
System\Security\Cryptography\Xml\Utils.cs (2)
753if (algorithm is null && !OperatingSystem.IsTvOS() && !OperatingSystem.IsIOS())
System.Threading.Tasks.Parallel (4)
System\Threading\Tasks\Parallel.cs (2)
243if (OperatingSystem.IsBrowser() || OperatingSystem.IsWasi() ||
System\Threading\Tasks\TaskReplicator.cs (2)
135if (OperatingSystem.IsBrowser() || OperatingSystem.IsWasi() )
Templates.Blazor.Tests (7)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
61process = Path.ChangeExtension(dllPath, OperatingSystem.IsWindows() ? ".exe" : null);
src\ProjectTemplates\Shared\Project.cs (3)
375if (OperatingSystem.IsWindows()) 379if (OperatingSystem.IsLinux()) 383if (OperatingSystem.IsMacOS())
src\Shared\CertificateGeneration\CertificateManager.cs (2)
46public static CertificateManager Instance { get; } = OperatingSystem.IsWindows() ? 50OperatingSystem.IsMacOS() ?
src\Shared\Process\ProcessExtensions.cs (1)
21if (OperatingSystem.IsWindows())
Templates.Blazor.WebAssembly.Auth.Tests (7)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
61process = Path.ChangeExtension(dllPath, OperatingSystem.IsWindows() ? ".exe" : null);
src\ProjectTemplates\Shared\Project.cs (3)
375if (OperatingSystem.IsWindows()) 379if (OperatingSystem.IsLinux()) 383if (OperatingSystem.IsMacOS())
src\Shared\CertificateGeneration\CertificateManager.cs (2)
46public static CertificateManager Instance { get; } = OperatingSystem.IsWindows() ? 50OperatingSystem.IsMacOS() ?
src\Shared\Process\ProcessExtensions.cs (1)
21if (OperatingSystem.IsWindows())
Templates.Blazor.WebAssembly.Tests (7)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
61process = Path.ChangeExtension(dllPath, OperatingSystem.IsWindows() ? ".exe" : null);
src\ProjectTemplates\Shared\Project.cs (3)
375if (OperatingSystem.IsWindows()) 379if (OperatingSystem.IsLinux()) 383if (OperatingSystem.IsMacOS())
src\Shared\CertificateGeneration\CertificateManager.cs (2)
46public static CertificateManager Instance { get; } = OperatingSystem.IsWindows() ? 50OperatingSystem.IsMacOS() ?
src\Shared\Process\ProcessExtensions.cs (1)
21if (OperatingSystem.IsWindows())
Templates.Mvc.Tests (7)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
61process = Path.ChangeExtension(dllPath, OperatingSystem.IsWindows() ? ".exe" : null);
src\ProjectTemplates\Shared\Project.cs (3)
375if (OperatingSystem.IsWindows()) 379if (OperatingSystem.IsLinux()) 383if (OperatingSystem.IsMacOS())
src\Shared\CertificateGeneration\CertificateManager.cs (2)
46public static CertificateManager Instance { get; } = OperatingSystem.IsWindows() ? 50OperatingSystem.IsMacOS() ?
src\Shared\Process\ProcessExtensions.cs (1)
21if (OperatingSystem.IsWindows())
Templates.Tests (7)
src\ProjectTemplates\Shared\AspNetProcess.cs (1)
61process = Path.ChangeExtension(dllPath, OperatingSystem.IsWindows() ? ".exe" : null);
src\ProjectTemplates\Shared\Project.cs (3)
375if (OperatingSystem.IsWindows()) 379if (OperatingSystem.IsLinux()) 383if (OperatingSystem.IsMacOS())
src\Shared\CertificateGeneration\CertificateManager.cs (2)
46public static CertificateManager Instance { get; } = OperatingSystem.IsWindows() ? 50OperatingSystem.IsMacOS() ?
src\Shared\Process\ProcessExtensions.cs (1)
21if (OperatingSystem.IsWindows())