diff --git a/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessThread.FreeBSD.cs b/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessThread.FreeBSD.cs index 3fd30ba9ba2c50..92aaf181c6f90a 100644 --- a/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessThread.FreeBSD.cs +++ b/src/libraries/System.Diagnostics.Process/src/System/Diagnostics/ProcessThread.FreeBSD.cs @@ -50,6 +50,9 @@ public TimeSpan TotalProcessorTime /// Returns the amount of time the associated thread has spent running code /// inside the application (not the operating system core). /// + [UnsupportedOSPlatform("ios")] + [UnsupportedOSPlatform("tvos")] + [SupportedOSPlatform("maccatalyst")] public TimeSpan UserProcessorTime { get diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/HttpClientHandler.AnyMobile.cs b/src/libraries/System.Net.Http/src/System/Net/Http/HttpClientHandler.AnyMobile.cs index 53ae907c7bfe7f..02f84782fbcb6b 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/HttpClientHandler.AnyMobile.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/HttpClientHandler.AnyMobile.cs @@ -617,6 +617,8 @@ public bool UseProxy } [UnsupportedOSPlatform("browser")] + [UnsupportedOSPlatform("ios")] + [UnsupportedOSPlatform("tvos")] public IWebProxy? Proxy { get diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs index be30ca79090c95..1caf3d819be853 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPool.cs @@ -1205,7 +1205,9 @@ internal void HandleAltSvc(IEnumerable altSvcHeaderValues, TimeSpan? res if (!nextAuthorityPersist) { +#if !ILLUMOS && !SOLARIS _poolManager.StartMonitoringNetworkChanges(); +#endif } } } diff --git a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPoolManager.cs b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPoolManager.cs index f118d151c692ae..fdfcd5fa7cce01 100644 --- a/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPoolManager.cs +++ b/src/libraries/System.Net.Http/src/System/Net/Http/SocketsHttpHandler/HttpConnectionPoolManager.cs @@ -44,7 +44,9 @@ internal sealed class HttpConnectionPoolManager : IDisposable private readonly IWebProxy? _proxy; private readonly ICredentials? _proxyCredentials; +#if !ILLUMOS && !SOLARIS private NetworkChangeCleanup? _networkChangeCleanup; +#endif /// /// Keeps track of whether or not the cleanup timer is running. It helps us avoid the expensive @@ -150,6 +152,7 @@ public HttpConnectionPoolManager(HttpConnectionSettings settings) } } +#if !ILLUMOS && !SOLARIS /// /// Starts monitoring for network changes. Upon a change, will be /// called for every in the . @@ -219,6 +222,7 @@ public void Dispose() GC.SuppressFinalize(this); } } +#endif public HttpConnectionSettings Settings => _settings; public ICredentials? ProxyCredentials => _proxyCredentials; @@ -454,7 +458,9 @@ public void Dispose() pool.Value.Dispose(); } +#if !ILLUMOS && !SOLARIS _networkChangeCleanup?.Dispose(); +#endif } /// Sets and based on the specified timeout. diff --git a/src/libraries/System.Net.NetworkInformation/ref/System.Net.NetworkInformation.cs b/src/libraries/System.Net.NetworkInformation/ref/System.Net.NetworkInformation.cs index 7e5c95ee00f7bb..df04b533cca1b0 100644 --- a/src/libraries/System.Net.NetworkInformation/ref/System.Net.NetworkInformation.cs +++ b/src/libraries/System.Net.NetworkInformation/ref/System.Net.NetworkInformation.cs @@ -335,7 +335,11 @@ public partial class NetworkChange [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.ObsoleteAttribute("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)] public NetworkChange() { } + [System.Runtime.Versioning.UnsupportedOSPlatform("illumos")] + [System.Runtime.Versioning.UnsupportedOSPlatform("solaris")] public static event System.Net.NetworkInformation.NetworkAddressChangedEventHandler? NetworkAddressChanged { add { } remove { } } + [System.Runtime.Versioning.UnsupportedOSPlatform("illumos")] + [System.Runtime.Versioning.UnsupportedOSPlatform("solaris")] public static event System.Net.NetworkInformation.NetworkAvailabilityChangedEventHandler? NetworkAvailabilityChanged { add { } remove { } } [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] [System.ObsoleteAttribute("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)] diff --git a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.OSX.cs b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.OSX.cs index b7c14cad78daea..fbdd96ab0a0388 100644 --- a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.OSX.cs +++ b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.OSX.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Runtime.InteropServices; +using System.Runtime.Versioning; using Microsoft.Win32.SafeHandles; using System.Diagnostics; using System.Threading; @@ -38,6 +39,8 @@ public partial class NetworkChange private static readonly AutoResetEvent s_runLoopStartedEvent = new AutoResetEvent(false); private static readonly AutoResetEvent s_runLoopEndedEvent = new AutoResetEvent(false); + [UnsupportedOSPlatform("illumos")] + [UnsupportedOSPlatform("solaris")] public static event NetworkAddressChangedEventHandler? NetworkAddressChanged { add @@ -75,6 +78,8 @@ public static event NetworkAddressChangedEventHandler? NetworkAddressChanged } } + [UnsupportedOSPlatform("illumos")] + [UnsupportedOSPlatform("solaris")] public static event NetworkAvailabilityChangedEventHandler? NetworkAvailabilityChanged { add diff --git a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.Unix.cs b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.Unix.cs index b52087bfda8ea6..1cec0c010bca68 100644 --- a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.Unix.cs +++ b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.Unix.cs @@ -6,6 +6,7 @@ using System.Diagnostics; using System.Net.Sockets; using System.Runtime.InteropServices; +using System.Runtime.Versioning; using System.Threading; using System.Threading.Tasks; @@ -43,6 +44,8 @@ private static Socket? Socket private static Timer? s_availabilityTimer; private static bool s_availabilityHasChanged; + [UnsupportedOSPlatform("illumos")] + [UnsupportedOSPlatform("solaris")] public static event NetworkAddressChangedEventHandler? NetworkAddressChanged { add @@ -83,6 +86,8 @@ public static event NetworkAddressChangedEventHandler? NetworkAddressChanged } } + [UnsupportedOSPlatform("illumos")] + [UnsupportedOSPlatform("solaris")] public static event NetworkAvailabilityChangedEventHandler? NetworkAvailabilityChanged { add diff --git a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.Windows.cs b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.Windows.cs index 745b8492f87e15..dc5dc82ad79d9a 100644 --- a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.Windows.cs +++ b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.Windows.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Net.Sockets; +using System.Runtime.Versioning; using System.Threading; namespace System.Net.NetworkInformation @@ -13,6 +14,8 @@ public partial class NetworkChange { private static readonly object s_globalLock = new object(); + [UnsupportedOSPlatform("illumos")] + [UnsupportedOSPlatform("solaris")] public static event NetworkAvailabilityChangedEventHandler? NetworkAvailabilityChanged { add @@ -25,6 +28,8 @@ public static event NetworkAvailabilityChangedEventHandler? NetworkAvailabilityC } } + [UnsupportedOSPlatform("illumos")] + [UnsupportedOSPlatform("solaris")] public static event NetworkAddressChangedEventHandler? NetworkAddressChanged { add