You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Foundation] Fix nullability in NSConnection. (#24438)
This is file 39 of 47 files with nullability disabled in Foundation.
Changes:
- Enabled nullability
- Added proper XML documentation for all public members, replacing "To be added" placeholders
- Added ArgumentNullException.ThrowIfNull checks for string and NSPortNameServer parameters
- Added see cref attributes for better documentation cross-referencing
- Added paramref attributes for parameter references in remarks
- Fixed XML formatting and removed unnecessary whitespace
- Documented the relationship between instance and static GetRootProxy methods
Contributes towards #17285.
---------
Co-authored-by: Copilot <noreply@github.com>
Copy file name to clipboardExpand all lines: src/Foundation/NSConnection.cs
+21-22Lines changed: 21 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -30,40 +30,39 @@
30
30
31
31
usingSystem.Diagnostics.CodeAnalysis;
32
32
33
-
// Disable until we get around to enable + fix any issues.
34
-
#nullable disable
33
+
#nullable enable
35
34
36
35
namespaceFoundation{
37
36
publicpartialclassNSConnection{
38
37
39
-
/// <typeparam name="TProxy">To be added.</typeparam>
40
-
/// <summary>To be added.</summary>
41
-
/// <returns>To be added.</returns>
42
-
/// <remarks>To be added.</remarks>
38
+
/// <summary>Gets the root proxy object for this connection.</summary>
39
+
/// <typeparam name="TProxy">The type of the proxy object to return.</typeparam>
40
+
/// <returns>The root proxy object, cast to the specified type.</returns>
41
+
/// <remarks>This method retrieves the root object provided by the receiver's peer. The returned object is a proxy that represents the root object on the remote side of the connection.</remarks>
/// <summary>Gets the root proxy object for the connection identified by name and host.</summary>
48
+
/// <typeparam name="TProxy">The type of the proxy object to return.</typeparam>
49
+
/// <param name="name">The name of the connection.</param>
50
+
/// <param name="hostName">The name of the host on which the connection is registered.</param>
51
+
/// <returns>The root proxy object for the specified connection, cast to the specified type.</returns>
52
+
/// <remarks>This method retrieves the root object from a connection identified by <paramref name="name" /> on the specified <paramref name="hostName" />.</remarks>
/// <summary>Gets the root proxy object for the connection identified by name, host, and port name server.</summary>
59
+
/// <typeparam name="TProxy">The type of the proxy object to return.</typeparam>
60
+
/// <param name="name">The name of the connection.</param>
61
+
/// <param name="hostName">The name of the host on which the connection is registered.</param>
62
+
/// <param name="server">The <see cref="NSPortNameServer" /> to use for looking up the connection.</param>
63
+
/// <returns>The root proxy object for the specified connection, cast to the specified type.</returns>
64
+
/// <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>
0 commit comments