Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wasm] Support network status information #71941

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,5 @@
<PropertyGroup>
<StrongNameKeyId>Microsoft</StrongNameKeyId>
<IncludePlatformAttributes>true</IncludePlatformAttributes>
<UnsupportedOSPlatforms>browser</UnsupportedOSPlatforms>
</PropertyGroup>
</Project>

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Linux;$(NetCoreAppCurrent)-Android;$(NetCoreAppCurrent)-OSX;$(NetCoreAppCurrent)-iOS;$(NetCoreAppCurrent)-tvOS;$(NetCoreAppCurrent)-FreeBSD;$(NetCoreAppCurrent)-illumos;$(NetCoreAppCurrent)-Solaris;$(NetCoreAppCurrent)</TargetFrameworks>
<TargetFrameworks>$(NetCoreAppCurrent)-windows;$(NetCoreAppCurrent)-Linux;$(NetCoreAppCurrent)-Android;$(NetCoreAppCurrent)-OSX;$(NetCoreAppCurrent)-iOS;$(NetCoreAppCurrent)-tvOS;$(NetCoreAppCurrent)-FreeBSD;$(NetCoreAppCurrent)-illumos;$(NetCoreAppCurrent)-Solaris;$(NetCoreAppCurrent)-Browser;$(NetCoreAppCurrent)</TargetFrameworks>
</PropertyGroup>
<!-- DesignTimeBuild requires all the TargetFramework Derived Properties to not be present in the first property group. -->
<PropertyGroup>
Expand All @@ -27,7 +27,7 @@
<Compile Include="System\Net\NetworkInformation\MulticastIPAddressInformationCollection.cs" />
<Compile Include="System\Net\NetworkInformation\NetBiosNodeType.cs" />
<Compile Include="System\Net\NetworkInformation\NetEventSource.NetworkInformation.cs" />
<Compile Include="System\Net\NetworkInformation\NetworkAddressChange.cs" Condition="'$(TargetPlatformIdentifier)' != 'illumos' and '$(TargetPlatformIdentifier)' != 'Solaris'" />
<Compile Include="System\Net\NetworkInformation\NetworkAddressChange.cs" Condition="'$(TargetPlatformIdentifier)' != 'illumos' and '$(TargetPlatformIdentifier)' != 'Solaris' and '$(TargetPlatformIdentifier)' != 'Browser'" />
<Compile Include="System\Net\NetworkInformation\NetworkAvailabilityEventArgs.cs" />
<Compile Include="System\Net\NetworkInformation\NetworkChangeDelegates.cs" />
<Compile Include="System\Net\NetworkInformation\NetworkInterface.cs" />
Expand All @@ -48,7 +48,7 @@
<Compile Include="$(CommonPath)DisableRuntimeMarshalling.cs"
Link="Common\DisableRuntimeMarshalling.cs" />
<Compile Include="$(CommonPath)System\NotImplemented.cs" Link="Common\System\NotImplemented.cs" />
<Compile Include="$(CommonPath)System\Net\NetworkInformation\HostInformation.cs" Link="Common\System\Net\NetworkInformation\HostInformation.cs" />
<Compile Include="$(CommonPath)System\Net\NetworkInformation\HostInformation.cs" Link="Common\System\Net\NetworkInformation\HostInformation.cs" Condition="'$(TargetPlatformIdentifier)' != 'Browser'" />
<Compile Include="$(CommonPath)System\Net\NetworkInformation\NetworkInformationException.cs" Link="Common\System\Net\NetworkInformation\NetworkInformationException.cs" />
<Compile Include="$(CommonPath)System\HexConverter.cs" Link="Common\System\HexConverter.cs" />
<Compile Include="$(CommonPath)System\Threading\Tasks\TaskToApm.cs" Link="Common\System\Threading\Tasks\TaskToApm.cs" />
Expand Down Expand Up @@ -98,7 +98,7 @@
<Compile Include="$(CommonPath)Interop\Windows\WinSock\Interop.WSAIoctl.cs" Link="Common\Interop\Windows\WinSock\Interop.WSAIoctl.cs" />
</ItemGroup>
<!-- Unix -->
<ItemGroup Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetPlatformIdentifier)' != 'windows'">
<ItemGroup Condition="'$(TargetPlatformIdentifier)' != '' and '$(TargetPlatformIdentifier)' != 'windows' and '$(TargetPlatformIdentifier)' != 'Browser'">
<Compile Include="System\Net\NetworkInformation\IPAddressUtil.cs" />
<Compile Include="System\Net\NetworkInformation\NetworkFiles.cs" />
<Compile Include="System\Net\NetworkInformation\SimpleGatewayIPAddressInformation.Unix.cs" />
Expand Down Expand Up @@ -159,6 +159,17 @@
<Compile Include="System\Net\NetworkInformation\NetworkInterfacePal.Android.cs" />
<Compile Include="System\Net\NetworkInformation\AndroidNetworkInterface.cs" />
</ItemGroup>
<!-- Browser -->
<ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Browser'">
<Compile Include="System\Net\NetworkInformation\BrowserNetworkInterfaceInterop.cs" />
<Compile Include="System\Net\NetworkInformation\IPGlobalPropertiesPal.Browser.cs" />
<Compile Include="System\Net\NetworkInformation\NetworkInterfacePal.Browser.cs" />
<Compile Include="System\Net\NetworkInformation\NetworkAddressChange.Browser.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'Browser'">
<ProjectReference Include="$(LibrariesProjectRoot)System.Runtime.InteropServices.JavaScript\gen\JSImportGenerator\JSImportGenerator.csproj" OutputItemType="Analyzer" ReferenceOutputAssembly="false" />
<Reference Include="System.Runtime.InteropServices.JavaScript" />
</ItemGroup>
<!-- OSX -->
<ItemGroup Condition="'$(TargetPlatformIdentifier)' == 'OSX' or '$(TargetPlatformIdentifier)' == 'iOS' or '$(TargetPlatformIdentifier)' == 'tvOS' or '$(TargetPlatformIdentifier)' == 'FreeBSD'">
<Compile Include="System\Net\NetworkInformation\IPGlobalPropertiesPal.Bsd.cs" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Runtime.InteropServices.JavaScript;

namespace System.Net.NetworkInformation
{
internal static partial class BrowserNetworkInterfaceInterop
{
[JSImport("INTERNAL.network_wasm_is_online_api_available")]
public static partial bool IsApiAvailable();

[JSImport("INTERNAL.network_wasm_is_online")]
public static partial bool IsOnline();

[JSImport("INTERNAL.network_wasm_set_change_listener")]
public static partial void SetChangeListener([JSMarshalAs<JSType.Function<JSType.Boolean>>] Action<bool> handler);

[JSImport("INTERNAL.network_wasm_remove_change_listener")]
public static partial void RemoveChangeListener();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace System.Net.NetworkInformation
/// <summary>
/// Specifies the current state of an IP address.
/// </summary>
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public enum DuplicateAddressDetectionState
{
Invalid = 0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace System.Net.NetworkInformation
/// <summary>
/// Provides information about a network interface address.
/// </summary>
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public abstract class GatewayIPAddressInformation
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

namespace System.Net.NetworkInformation
{
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public class GatewayIPAddressInformationCollection : ICollection<GatewayIPAddressInformation>
{
private readonly List<GatewayIPAddressInformation> _addresses;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace System.Net.NetworkInformation
/// <summary>
/// Provides information about a network interface address.
/// </summary>
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public abstract class IPAddressInformation
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

namespace System.Net.NetworkInformation
{
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public class IPAddressInformationCollection : ICollection<IPAddressInformation>
{
private readonly List<IPAddressInformation> _addresses = new List<IPAddressInformation>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ namespace System.Net.NetworkInformation
/// Provides various global machine properties related to Internet Protocol (IP),
/// such as the local host name, domain name, and active socket connections.
/// </summary>
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public abstract class IPGlobalProperties
{
[UnsupportedOSPlatform("illumos")]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

namespace System.Net.NetworkInformation
{
internal static class IPGlobalPropertiesPal
{
public static IPGlobalProperties GetIPGlobalProperties() => throw new PlatformNotSupportedException();
maraf marked this conversation as resolved.
Show resolved Hide resolved
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace System.Net.NetworkInformation
/// <summary>
/// Provides Internet Protocol (IP) statistical data for the local machine.
/// </summary>
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public abstract class IPGlobalStatistics
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace System.Net.NetworkInformation
/// Provides information about a network interface that supports Internet Protocol (IP).
/// such as the addresses assigned to the adapter, and other DNS and routing-related information.
/// </summary>
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public abstract class IPInterfaceProperties
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ namespace System.Net.NetworkInformation
/// Provides statistics information for a particular network interface,
/// such as the total number of bytes sent and received.
/// </summary>
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public abstract class IPInterfaceStatistics
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace System.Net.NetworkInformation
/// <summary>
/// Provides information about network interfaces that support Internet Protocol (IP) version 4.0.
/// </summary>
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public abstract class IPv4InterfaceProperties
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace System.Net.NetworkInformation
/// <summary>
/// Provides information about network interfaces that support Internet Protocol (IP) version 6.0.
/// </summary>
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public abstract class IPv6InterfaceProperties
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace System.Net.NetworkInformation
/// <summary>
/// Provides Internet Control Message Protocol for IPv4 (ICMPv4) statistical data for the local computer.
/// </summary>
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public abstract class IcmpV4Statistics
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace System.Net.NetworkInformation
/// <summary>
/// Provides Internet Control Message Protocol for Internet Protocol version 6 (ICMPv6) statistical data for the local computer.
/// </summary>
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public abstract class IcmpV6Statistics
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace System.Net.NetworkInformation
/// <summary>
/// Provides statistical data for a network interface on the local computer.
/// </summary>
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public abstract partial class IPv4InterfaceStatistics
{
protected IPv4InterfaceStatistics() { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ namespace System.Net.NetworkInformation
/// <summary>
/// Provides information about a network interface's unicast address.
/// </summary>
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public abstract class MulticastIPAddressInformation : IPAddressInformation
{
/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

namespace System.Net.NetworkInformation
{
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public class MulticastIPAddressInformationCollection : ICollection<MulticastIPAddressInformation>
{
private readonly List<MulticastIPAddressInformation> _addresses = new List<MulticastIPAddressInformation>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ namespace System.Net.NetworkInformation
/// <summary>
/// Specifies the Network Basic Input/Output System (NetBIOS) node type.
/// </summary>
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
public enum NetBiosNodeType
{
Unknown = 0,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using Microsoft.Win32.SafeHandles;

using System.ComponentModel;
using System.Collections.Generic;
using System.Net.Sockets;
using System.Runtime.Versioning;
using System.Threading;

namespace System.Net.NetworkInformation
{
// Browser implementation of NetworkChange
public partial class NetworkChange
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not do this like other platform specific partial classes like NetworkAddressChange.Unix.cs?

Copy link
Member Author

@maraf maraf Jul 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand what do you mean. Can you please give me a clue?

{
private static event NetworkAvailabilityChangedEventHandler? s_networkAvailabilityChanged;

[UnsupportedOSPlatform("illumos")]
[UnsupportedOSPlatform("solaris")]
public static event NetworkAvailabilityChangedEventHandler? NetworkAvailabilityChanged
{
add
{
if (!BrowserNetworkInterfaceInterop.IsApiAvailable())
throw new System.PlatformNotSupportedException(System.SR.SystemNetNetworkInformation_PlatformNotSupported);

if (s_networkAvailabilityChanged == null)
pavelsavara marked this conversation as resolved.
Show resolved Hide resolved
BrowserNetworkInterfaceInterop.SetChangeListener(OnNetworkAvailabilityChanged);

s_networkAvailabilityChanged += value;
}
remove
{
if (!BrowserNetworkInterfaceInterop.IsApiAvailable())
throw new System.PlatformNotSupportedException(System.SR.SystemNetNetworkInformation_PlatformNotSupported);

s_networkAvailabilityChanged -= value;
maraf marked this conversation as resolved.
Show resolved Hide resolved

if (s_networkAvailabilityChanged == null)
BrowserNetworkInterfaceInterop.RemoveChangeListener();
}
}

private static void OnNetworkAvailabilityChanged(bool isOnline) => s_networkAvailabilityChanged?.Invoke(null, new NetworkAvailabilityEventArgs(isOnline));

[UnsupportedOSPlatform("browser")]
[UnsupportedOSPlatform("illumos")]
[UnsupportedOSPlatform("solaris")]
public static event NetworkAddressChangedEventHandler? NetworkAddressChanged
{
add => throw new System.PlatformNotSupportedException(System.SR.SystemNetNetworkInformation_PlatformNotSupported);
remove => throw new System.PlatformNotSupportedException(System.SR.SystemNetNetworkInformation_PlatformNotSupported);
Comment on lines +52 to +53
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The corresponding tests should be run for browser, and check for PNSE.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, are we writing a test for every API that is not supported on any platform?
Because this is already not supported on illumos and solaris. Should I run the test also on these platforms?

}

[EditorBrowsableAttribute(EditorBrowsableState.Never)]
[Obsolete("This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.", true)]
public NetworkChange()
{
}

// Introduced for supporting design-time loading of System.Windows.dll
[EditorBrowsable(EditorBrowsableState.Never)]
[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) { }
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public partial class NetworkChange
private static readonly AutoResetEvent s_runLoopStartedEvent = new AutoResetEvent(false);
private static readonly AutoResetEvent s_runLoopEndedEvent = new AutoResetEvent(false);

[UnsupportedOSPlatform("browser")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIUC, this shouldn't be needed in platform specific implementation files, since they are included in the build only for the relevant platforms. Same for others.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure? If I hadn't have them, the ApiCompat was complaining.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make sure to include the main .cs file also. What was the output from apicompat?

Copy link
Member Author

@maraf maraf Jul 14, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I just drop this one and try to compile with

.\dotnet.cmd build /p:TargetOS=Browser /p:TargetArchitecture=wasm /p:Configuration=Debug .\src\libraries\System.Net.NetworkInformation\src\

it fails with

....\.nuget\packages\microsoft.dotnet.apicompat\7.0.0-beta.22358.3\build\Microsoft.DotNet.ApiCompat.targets(52,5): error : Compat issues with assembly System.Net.NetworkInformation: [....\src\libraries\System.Net.NetworkInformation\src\Sy
stem.Net.NetworkInformation.csproj]
....\.nuget\packages\microsoft.dotnet.apicompat\7.0.0-beta.22358.3\build\Microsoft.DotNet.ApiCompat.targets(52,5): error : CannotChangeAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' on 'System.Net.NetworkInformation.NetworkChange
.NetworkAddressChanged' changed from '[UnsupportedOSPlatformAttribute("browser")]' in the contract to '[UnsupportedOSPlatformAttribute("illumos")]' in the implementation. [....\src\libraries\System.Net.NetworkInformation\src\System.Net.NetworkInformation
.csproj]
....\.nuget\packages\microsoft.dotnet.apicompat\7.0.0-beta.22358.3\build\Microsoft.DotNet.ApiCompat.targets(66,5): error : ApiCompat failed for '....\artifacts\bin\System.Net.NetworkInformation\Debug\net7.0-tvos\System.Net.NetworkInformat
ion.dll' [....\src\libraries\System.Net.NetworkInformation\src\System.Net.NetworkInformation.csproj]
....\.nuget\packages\microsoft.dotnet.apicompat\7.0.0-beta.22358.3\build\Microsoft.DotNet.ApiCompat.targets(52,5): error : Compat issues with assembly System.Net.NetworkInformation: [....\src\libraries\System.Net.NetworkInformation\src\Sy
stem.Net.NetworkInformation.csproj]
....\.nuget\packages\microsoft.dotnet.apicompat\7.0.0-beta.22358.3\build\Microsoft.DotNet.ApiCompat.targets(52,5): error : CannotChangeAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' on 'System.Net.NetworkInformation.NetworkChange
.NetworkAddressChanged' changed from '[UnsupportedOSPlatformAttribute("browser")]' in the contract to '[UnsupportedOSPlatformAttribute("illumos")]' in the implementation. [....\src\libraries\System.Net.NetworkInformation\src\System.Net.NetworkInformation
.csproj]
....\.nuget\packages\microsoft.dotnet.apicompat\7.0.0-beta.22358.3\build\Microsoft.DotNet.ApiCompat.targets(66,5): error : ApiCompat failed for '....\artifacts\bin\System.Net.NetworkInformation\Debug\net7.0-ios\System.Net.NetworkInformati
on.dll' [....\src\libraries\System.Net.NetworkInformation\src\System.Net.NetworkInformation.csproj]
....\.nuget\packages\microsoft.dotnet.apicompat\7.0.0-beta.22358.3\build\Microsoft.DotNet.ApiCompat.targets(52,5): error : Compat issues with assembly System.Net.NetworkInformation: [....\src\libraries\System.Net.NetworkInformation\src\Sy
stem.Net.NetworkInformation.csproj]
....\.nuget\packages\microsoft.dotnet.apicompat\7.0.0-beta.22358.3\build\Microsoft.DotNet.ApiCompat.targets(52,5): error : CannotChangeAttribute : Attribute 'System.Runtime.Versioning.UnsupportedOSPlatformAttribute' on 'System.Net.NetworkInformation.NetworkChange
.NetworkAddressChanged' changed from '[UnsupportedOSPlatformAttribute("browser")]' in the contract to '[UnsupportedOSPlatformAttribute("illumos")]' in the implementation. [....\src\libraries\System.Net.NetworkInformation\src\System.Net.NetworkInformation
.csproj]
....\.nuget\packages\microsoft.dotnet.apicompat\7.0.0-beta.22358.3\build\Microsoft.DotNet.ApiCompat.targets(66,5): error : ApiCompat failed for '....\artifacts\bin\System.Net.NetworkInformation\Debug\net7.0-osx\System.Net.NetworkInformati
on.dll' [....\src\libraries\System.Net.NetworkInformation\src\System.Net.NetworkInformation.csproj]

[UnsupportedOSPlatform("illumos")]
[UnsupportedOSPlatform("solaris")]
public static event NetworkAddressChangedEventHandler? NetworkAddressChanged
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public partial class NetworkChange
private static Timer? s_availabilityTimer;
private static bool s_availabilityHasChanged;

[UnsupportedOSPlatform("browser")]
[UnsupportedOSPlatform("illumos")]
[UnsupportedOSPlatform("solaris")]
public static event NetworkAddressChangedEventHandler? NetworkAddressChanged
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public NetworkChange()
{
}

[UnsupportedOSPlatform("browser")]
[UnsupportedOSPlatform("illumos")]
[UnsupportedOSPlatform("solaris")]
public static event NetworkAddressChangedEventHandler? NetworkAddressChanged
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public partial class NetworkChange
}
}

[UnsupportedOSPlatform("browser")]
[UnsupportedOSPlatform("illumos")]
[UnsupportedOSPlatform("solaris")]
public static event NetworkAddressChangedEventHandler? NetworkAddressChanged
Expand Down
Loading