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

Mark PNSE-throwing methods in System.Net.NetworkInformation.IPGlobalProperties as unsupported on Android #50855

Merged
Merged
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 @@ -130,8 +130,11 @@ public abstract partial class IPGlobalProperties
public abstract System.Net.NetworkInformation.NetBiosNodeType NodeType { get; }
public virtual System.IAsyncResult BeginGetUnicastAddresses(System.AsyncCallback? callback, object? state) { throw null; }
public virtual System.Net.NetworkInformation.UnicastIPAddressInformationCollection EndGetUnicastAddresses(System.IAsyncResult asyncResult) { throw null; }
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
public abstract System.Net.NetworkInformation.TcpConnectionInformation[] GetActiveTcpConnections();
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
public abstract System.Net.IPEndPoint[] GetActiveTcpListeners();
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
public abstract System.Net.IPEndPoint[] GetActiveUdpListeners();
MaximLipnin marked this conversation as resolved.
Show resolved Hide resolved
public abstract System.Net.NetworkInformation.IcmpV4Statistics GetIcmpV4Statistics();
public abstract System.Net.NetworkInformation.IcmpV6Statistics GetIcmpV6Statistics();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// 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.Versioning;
using System.Threading.Tasks;

namespace System.Net.NetworkInformation
Expand All @@ -19,16 +20,19 @@ public static IPGlobalProperties GetIPGlobalProperties()
/// <summary>
/// Gets the Active Udp Listeners on this machine.
/// </summary>
[UnsupportedOSPlatform("android")]
public abstract IPEndPoint[] GetActiveUdpListeners();

/// <summary>
/// Gets the Active Tcp Listeners on this machine.
/// </summary>
[UnsupportedOSPlatform("android")]
public abstract IPEndPoint[] GetActiveTcpListeners();

/// <summary>
/// Gets the Active Udp Listeners on this machine.
/// </summary>
[UnsupportedOSPlatform("android")]
public abstract TcpConnectionInformation[] GetActiveTcpConnections();

/// <summary>
Expand Down