96 references to IsWasi
Microsoft.Extensions.Configuration.Xml (1)
XmlDocumentDecryptor.cs (1)
106if (OperatingSystem.IsWasi()) throw new PlatformNotSupportedException();
Microsoft.Extensions.FileProviders.Physical (2)
PhysicalFileProvider.cs (1)
167if (OperatingSystem.IsBrowser() || OperatingSystem.IsWasi() || (OperatingSystem.IsIOS() && !OperatingSystem.IsMacCatalyst()) || OperatingSystem.IsTvOS())
PhysicalFilesWatcher.cs (1)
88if (OperatingSystem.IsBrowser() || OperatingSystem.IsWasi() || (OperatingSystem.IsIOS() && !OperatingSystem.IsMacCatalyst()) || OperatingSystem.IsTvOS())
Microsoft.Extensions.Hosting (3)
HostBuilder.netcoreapp.cs (1)
14if (!OperatingSystem.IsAndroid() && !OperatingSystem.IsBrowser() && !OperatingSystem.IsWasi() && !OperatingSystem.IsIOS() && !OperatingSystem.IsTvOS())
HostingHostBuilderExtensions.cs (1)
296if (!OperatingSystem.IsBrowser() && !OperatingSystem.IsWasi())
Internal\ConsoleLifetime.netcoreapp.cs (1)
18if (!OperatingSystem.IsWasi())
Microsoft.Extensions.Hosting.Systemd (1)
SystemdNotifier.cs (1)
45if (OperatingSystem.IsWasi()) throw new PlatformNotSupportedException();
Microsoft.Extensions.Http (1)
MetricsFactoryHttpMessageHandlerFilter.cs (1)
36else if (!OperatingSystem.IsBrowser() && !OperatingSystem.IsWasi() && builder.PrimaryHandler is SocketsHttpHandler socketsHttpHandler)
System.ComponentModel.TypeConverter (1)
System\Security\Authentication\ExtendedProtection\ExtendedProtectionPolicyTypeConverter.cs (1)
24if (OperatingSystem.IsWasi()) throw new PlatformNotSupportedException(); // TODO remove with https://github.com/dotnet/runtime/pull/107185
System.Diagnostics.DiagnosticSource (3)
System\Diagnostics\Metrics\MetricsEventSource.cs (1)
342if (OperatingSystem.IsWasi())
System\Diagnostics\Metrics\RuntimeMetrics.cs (2)
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 (1)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetHostName.cs (1)
17if (OperatingSystem.IsWasi())
System.Diagnostics.TextWriterTraceListener (1)
System\Diagnostics\XmlWriterTraceListener.cs (1)
253if (OperatingSystem.IsBrowser() || OperatingSystem.IsWasi() ) // Process isn't supported on Browser
System.IO.Pipes (1)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetHostName.cs (1)
17if (OperatingSystem.IsWasi())
System.Linq.Parallel (1)
System\Linq\ParallelEnumerable.cs (1)
69internal static bool SinglePartitionMode => OperatingSystem.IsBrowser() || OperatingSystem.IsWasi();
System.Net.Http (1)
System\Net\Http\SocketsHttpHandler\SocketsHttpHandler.cs (1)
39public static bool IsSupported => !OperatingSystem.IsBrowser() && !OperatingSystem.IsWasi();
System.Net.NameResolution (16)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetHostName.cs (1)
17if (OperatingSystem.IsWasi())
src\libraries\Common\src\System\Net\SocketProtocolSupportPal.Unix.cs (1)
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)
20public static bool SupportsGetNameInfo => !OperatingSystem.IsWasi(); 156if (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)
17if (OperatingSystem.IsWasi())
System.Net.Ping (1)
src\libraries\Common\src\System\Net\SocketProtocolSupportPal.Unix.cs (1)
17if (af == AddressFamily.Unix && (OperatingSystem.IsTvOS() || OperatingSystem.IsWasi() || (OperatingSystem.IsIOS() && !OperatingSystem.IsMacCatalyst())))
System.Net.Primitives (1)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetHostName.cs (1)
17if (OperatingSystem.IsWasi())
System.Net.Sockets (45)
src\libraries\Common\src\System\Net\SocketProtocolSupportPal.Unix.cs (1)
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 3560if (OperatingSystem.IsWasi()) return; // WASI is always set to receive PacketInformation 3590if (OperatingSystem.IsWasi() && optionName == SocketOptionName.PacketInformation) 3667if (OperatingSystem.IsWasi() && lref.Enabled) throw new PlatformNotSupportedException(); // TODO remove with https://github.com/dotnet/runtime/pull/107185 3682if (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 (5)
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 (3)
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;
System.Private.CoreLib (5)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetHostName.cs (1)
17if (OperatingSystem.IsWasi())
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 (1)
37internal static bool DisableFileLocking { get; } = OperatingSystem.IsBrowser() || OperatingSystem.IsWasi()// #40065: Emscripten does not support file locking
src\libraries\System.Private.CoreLib\src\System\Globalization\GlobalizationMode.Unix.cs (1)
41if (OperatingSystem.IsBrowser() || OperatingSystem.IsWasi() || OperatingSystem.IsAndroid() ||
src\libraries\System.Private.CoreLib\src\System\Globalization\Normalization.Icu.cs (1)
202if ((OperatingSystem.IsBrowser() || OperatingSystem.IsWasi()) && (normalizationForm == NormalizationForm.FormKC || normalizationForm == NormalizationForm.FormKD))
System.Runtime.Caching (4)
System\Runtime\Caching\HostFileChangeMonitor.cs (1)
102if (OperatingSystem.IsBrowser() || OperatingSystem.IsWasi() || (OperatingSystem.IsIOS() && !OperatingSystem.IsMacCatalyst()) || OperatingSystem.IsTvOS())
System\Runtime\Caching\MemoryCache.cs (1)
44private static bool _countersSupported => !OperatingSystem.IsBrowser() && !OperatingSystem.IsWasi();
System\Runtime\Caching\MemoryCacheStatistics.cs (1)
43private static bool _configSupported => !OperatingSystem.IsBrowser() && !OperatingSystem.IsWasi();
System\Runtime\Caching\MemoryCacheStore.cs (1)
32private static bool _countersSupported => !OperatingSystem.IsBrowser() && !OperatingSystem.IsWasi();
System.Security.Cryptography (2)
src\libraries\Common\src\System\Security\Cryptography\Helpers.cs (2)
24!OperatingSystem.IsBrowser() && !OperatingSystem.IsWasi(); 50!OperatingSystem.IsBrowser() && !OperatingSystem.IsWasi();
System.Security.Cryptography.Pkcs (2)
src\libraries\Common\src\System\Security\Cryptography\Helpers.cs (2)
24!OperatingSystem.IsBrowser() && !OperatingSystem.IsWasi(); 50!OperatingSystem.IsBrowser() && !OperatingSystem.IsWasi();
System.Threading.Tasks.Parallel (2)
System\Threading\Tasks\Parallel.cs (1)
243if (OperatingSystem.IsBrowser() || OperatingSystem.IsWasi() ||
System\Threading\Tasks\TaskReplicator.cs (1)
135if (OperatingSystem.IsBrowser() || OperatingSystem.IsWasi() )