diff --git a/src/libraries/System.IO.FileSystem.Watcher/src/Configurations.props b/src/libraries/System.IO.FileSystem.Watcher/src/Configurations.props index 193ee5c3bdd..02e049f98ed 100644 --- a/src/libraries/System.IO.FileSystem.Watcher/src/Configurations.props +++ b/src/libraries/System.IO.FileSystem.Watcher/src/Configurations.props @@ -4,8 +4,9 @@ netcoreapp-Linux; netcoreapp-OSX; + netcoreapp-Unix; netcoreapp-Windows_NT; uap-Windows_NT; - \ No newline at end of file + diff --git a/src/libraries/System.Net.NetworkInformation/src/Configurations.props b/src/libraries/System.Net.NetworkInformation/src/Configurations.props index a12a65dcf94..7aa34f1cee1 100644 --- a/src/libraries/System.Net.NetworkInformation/src/Configurations.props +++ b/src/libraries/System.Net.NetworkInformation/src/Configurations.props @@ -5,7 +5,8 @@ uap-Windows_NT; netcoreapp-Linux; netcoreapp-OSX; + netcoreapp-Unix; netcoreapp-Windows_NT; - \ No newline at end of file + diff --git a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.Linux.cs b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.Linux.cs index 20eb5730561..7e4d3cbc905 100644 --- a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.Linux.cs +++ b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.Linux.cs @@ -27,10 +27,6 @@ namespace System.Net.NetworkInformation private static Timer s_availabilityTimer; private static bool s_availabilityHasChanged; - // Introduced for supporting design-time loading of System.Windows.dll - [Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)] - public static void RegisterNetworkChange(NetworkChange nc) { } - public static event NetworkAddressChangedEventHandler NetworkAddressChanged { add 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 aef7fb09943..bfb05c08eb3 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 @@ -41,10 +41,6 @@ namespace System.Net.NetworkInformation private static readonly AutoResetEvent s_runLoopStartedEvent = new AutoResetEvent(false); private static readonly AutoResetEvent s_runLoopEndedEvent = new AutoResetEvent(false); - //introduced for supporting design-time loading of System.Windows.dll - [Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)] - public static void RegisterNetworkChange(NetworkChange nc) { } - public static event NetworkAddressChangedEventHandler NetworkAddressChanged { add diff --git a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.UnknownUnix.cs b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.UnknownUnix.cs index 081c3420ba4..79f80374815 100644 --- a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.UnknownUnix.cs +++ b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.UnknownUnix.cs @@ -11,5 +11,11 @@ namespace System.Net.NetworkInformation add { throw new PlatformNotSupportedException(); } remove { throw new PlatformNotSupportedException(); } } + + public static event NetworkAvailabilityChangedEventHandler NetworkAvailabilityChanged + { + add { throw new PlatformNotSupportedException(); } + remove { throw new PlatformNotSupportedException(); } + } } } 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 28e9b7c6162..c029b93418d 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 @@ -12,10 +12,6 @@ namespace System.Net.NetworkInformation { public partial class NetworkChange { - //introduced for supporting design-time loading of System.Windows.dll - [Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)] - public static void RegisterNetworkChange(NetworkChange nc) { } - private static readonly object s_globalLock = new object(); public static event NetworkAvailabilityChangedEventHandler NetworkAvailabilityChanged diff --git a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.cs b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.cs index ed099bac0de..aa1c5119bb5 100644 --- a/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.cs +++ b/src/libraries/System.Net.NetworkInformation/src/System/Net/NetworkInformation/NetworkAddressChange.cs @@ -23,6 +23,10 @@ namespace System.Net.NetworkInformation private static readonly ContextCallback s_runHandlerNotAvailable = new ContextCallback(RunAvailabilityHandlerNotAvailable); private static readonly ContextCallback s_runAddressChangedHandler = new ContextCallback(RunAddressChangedHandler); + // Introduced for supporting design-time loading of System.Windows.dll + [Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)] + public static void RegisterNetworkChange(NetworkChange nc) { } + private static void RunAddressChangedHandler(object state) { ((NetworkAddressChangedEventHandler)state)(null, EventArgs.Empty);