Add documentation to System.Net#57855
Conversation
|
Tagging subscribers to this area: @dotnet/ncl Issue DetailsThis PR adds missing documentation to the Items that still need to be addressed:
Fixes: #43859
|
And fix some badly formed XML...
|
Adding @carlossanlop because he understands this stuff best. Some of this stuff, at least, has documentation already; e.g. https://docs.microsoft.com/en-us/dotnet/api/system.net.http.socketshttphandler.cookiecontainer?view=net-5.0 It's not in the doc comments in the source, but it exists out there somewhere that produces content like the link above. @carlossanlop Can you comment here? What is the right thing to be doing for stuff like this? |
I still don't think this is ready to be merged. I'll make this into a regular PR when I feel like the documentation is descriptive enough and compliant with all documentation standards. But I'd love to hear everyone's opinion on this addition and maybe what to refine. As I already mentioned, this is not the final thing.
Yes, that is something I'll have to look into as it's planned to extract API documentation from the source code (#44969). |
ManickaP
left a comment
There was a problem hiding this comment.
@carlossanlop do we care about porting back an existing documentation to triple slash? If so, shouldn't we do that automatically?
Also, some properties/methods have more details in the docs, e.g. PooledConnectionIdleTimeout#Property Value. Should that be ported as well?
|
@ManickaP there was effort to port docs back into triple-slash comments. We didn't act on it for 6.0, I assume it will be brought up again soon. |
I better oriented myself in the original issue. Porting back docs to triple slash is not the goal of #43859. Which is what I see in this PR. @FilipToth Only really missing pieces of documentation should be added. The table in the original issue says precisely what's missing. Please let me know if you still want to tackle this? Otherwise, I'll put up a PR on my own. |
|
And BTW the first item should be skipped since that API was removed in #37949 |
Ok, I'll go back and check all added documentation to see if it already exists.
Yes, I definitely still want to do this.
Ok, Thank you. |
|
Ok, marking this as ready for review as I think this should be OK. |
ManickaP
left a comment
There was a problem hiding this comment.
Thank you for the contribution!
There are still some things in the table that are missing, e.g.:M:System.Net.Security.NegotiateStream.WriteAsync(System.ReadOnlyMemory{System.Byte},System.Threading.CancellationToken) etc.
So they either need to get added in this PR. Or the work can be split and this PR made only contributing to the original issue. Up to you @FilipToth.
| @@ -10,6 +10,7 @@ namespace System.Net.Http | |||
| /// </summary> | |||
| /// <param name="headerName">Name of the header to specify the <see cref="Encoding"/> for.</param> | |||
| /// <param name="context">The <typeparamref name="TContext"/> we are enoding/decoding the headers for.</param> | |||
There was a problem hiding this comment.
There's a typo one line above, could you please fix that as well:
| /// <param name="context">The <typeparamref name="TContext"/> we are enoding/decoding the headers for.</param> | |
| /// <param name="context">The <typeparamref name="TContext"/> we are encoding/decoding the headers for.</param> |
| public IDictionary<string, object?> Properties => Options; | ||
|
|
||
| /// <summary> | ||
| /// Gets the options for the HTTP request. |
There was a problem hiding this comment.
I'd expect this to get a bit more specific description so that users actually know what it's good for a and how to use it.
But the whole Options related docs are WASM addition so it's up them how much details they want to put in, cc @lewing.
|
@ManickaP Thank you so much for the feedback. I'll be back with the requested changes. |
|
OK, I've made the changes as requested in the review. But I'm not sure about the |
ManickaP
left a comment
There was a problem hiding this comment.
Still missing summary for P:System.Net.Http.SocketsHttpHandler.Properties based on the orig issue table.
| return WriteAsync(new AsyncReadWriteAdapter(InnerStream, cancellationToken), new ReadOnlyMemory<byte>(buffer, offset, count)); | ||
| } | ||
|
|
||
| /// <returns>A <see cref="ValueTask"/> of void.</returns> |
There was a problem hiding this comment.
| /// <returns>A <see cref="ValueTask"/> of void.</returns> | |
| /// <returns>A <see cref="ValueTask"/> that represents the asynchronous read operation.</returns> |
| return new ValueTask(WriteAsync(new AsyncReadWriteAdapter(InnerStream, cancellationToken), buffer)); | ||
| } | ||
|
|
||
| /// <returns>A <see cref="Task"/> of void.</returns> |
There was a problem hiding this comment.
This is a private method, not an API.
|
@lewing Hi, could someone review the Options part? |
|
Hi @FilipToth, I just learned we need to get this in more urgently then we originally thought. So if you don't mind, I'll take over this PR. |
|
@pranavkm can you help review the options related work? |
Of course. I'm sorry, I just learned about the September 14th deadline. Makes sense to give you full control over the PR as this needs to be done fast. Thank you very much for your involvement with this community PR. |
3f4a50d to
a193171
Compare
* Ported docs from dotnet/runtime#57855 * Update xml/System.Net.Http/HeaderEncodingSelector`1.xml Co-authored-by: Carlos Sanchez <1175054+carlossanlop@users.noreply.github.com>
This PR adds missing documentation to the
HeaderEncodingSelector,HttpContent,SocketsHttpHandler,NegotiateStreamandWebHeaderCollectiontypes.TODO:
P:System.Net.WebHeaderCollection.Item(System.String)Contributes to #43859