Skip to content

Commit 264b15b

Browse files
committed
Let final API do any relevant null checks.
1 parent e2575d4 commit 264b15b

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

src/Foundation/NSConnection.cs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,8 @@ public TProxy GetRootProxy<TProxy> () where TProxy : NSObject
5050
/// <param name="hostName">The name of the host on which the connection is registered.</param>
5151
/// <returns>The root proxy object for the specified connection, cast to the specified type.</returns>
5252
/// <remarks>This method retrieves the root object from a connection identified by <paramref name="name" /> on the specified <paramref name="hostName" />.</remarks>
53-
public static TProxy GetRootProxy<TProxy> (string name, string hostName) where TProxy : NSObject
53+
public static TProxy GetRootProxy<TProxy> (string name, string? hostName) where TProxy : NSObject
5454
{
55-
ArgumentNullException.ThrowIfNull (name);
56-
ArgumentNullException.ThrowIfNull (hostName);
5755
return GetRootProxy<TProxy> (_GetRootProxy (name, hostName));
5856
}
5957

@@ -64,11 +62,8 @@ public static TProxy GetRootProxy<TProxy> (string name, string hostName) where T
6462
/// <param name="server">The <see cref="NSPortNameServer" /> to use for looking up the connection.</param>
6563
/// <returns>The root proxy object for the specified connection, cast to the specified type.</returns>
6664
/// <remarks>This method retrieves the root object from a connection identified by <paramref name="name" /> on the specified <paramref name="hostName" /> using the given port name server.</remarks>
67-
public static TProxy GetRootProxy<TProxy> (string name, string hostName, NSPortNameServer server) where TProxy : NSObject
65+
public static TProxy GetRootProxy<TProxy> (string name, string? hostName, NSPortNameServer server) where TProxy : NSObject
6866
{
69-
ArgumentNullException.ThrowIfNull (name);
70-
ArgumentNullException.ThrowIfNull (hostName);
71-
ArgumentNullException.ThrowIfNull (server);
7267
return GetRootProxy<TProxy> (_GetRootProxy (name, hostName, server));
7368
}
7469

0 commit comments

Comments
 (0)