From e7da70c5a214931ff7b8d783ba06f1e41c77419c Mon Sep 17 00:00:00 2001 From: David Cantu Date: Sun, 21 Jul 2019 13:52:39 -0700 Subject: [PATCH 1/2] Added documentation for System.Net.Sockets APIs targeted for 3.0 --- .../AuthenticatedStream.xml | 17 +- xml/System.Net.Security/NegotiateStream.xml | 18 +- xml/System.Net.Security/SslStream.xml | 161 ++++++++++++++---- 3 files changed, 160 insertions(+), 36 deletions(-) diff --git a/xml/System.Net.Security/AuthenticatedStream.xml b/xml/System.Net.Security/AuthenticatedStream.xml index 0ee6e89d080..f0825c500e1 100644 --- a/xml/System.Net.Security/AuthenticatedStream.xml +++ b/xml/System.Net.Security/AuthenticatedStream.xml @@ -182,9 +182,20 @@ The following example demonstrates displaying the properties of an authenticated - To be added. - To be added. - To be added. + Asynchronously releases the unmanaged and managed resources used by the . + A task that represents the asynchronous dispose operation. + + is `false`, otherwise, the inner stream is just flushed. + + Calling `DisposeAsync` allows the resources used by the to be reallocated for other purposes. For more information, see [Cleaning Up Unmanaged Resources](~/docs/standard/garbage-collection/unmanaged.md). + + ]]> + diff --git a/xml/System.Net.Security/NegotiateStream.xml b/xml/System.Net.Security/NegotiateStream.xml index ec8a9695da6..73ac20501a6 100644 --- a/xml/System.Net.Security/NegotiateStream.xml +++ b/xml/System.Net.Security/NegotiateStream.xml @@ -2629,9 +2629,21 @@ The following method is called when the operation completes. - To be added. - To be added. - To be added. + Asynchronously releases the unmanaged and managed resources used by the . + A task that represents the asynchronous dispose operation. + + + is `false`, otherwise, the inner stream is just flushed. + + Calling `DisposeAsync` allows the resources used by the to be reallocated for other purposes. For more information, see [Cleaning Up Unmanaged Resources](~/docs/standard/garbage-collection/unmanaged.md). + + ]]> + diff --git a/xml/System.Net.Security/SslStream.xml b/xml/System.Net.Security/SslStream.xml index 91a5d1ac163..b32390fecc9 100644 --- a/xml/System.Net.Security/SslStream.xml +++ b/xml/System.Net.Security/SslStream.xml @@ -2451,9 +2451,21 @@ - To be added. - To be added. - To be added. + Asynchronously releases the unmanaged and managed resources used by the . + A task that represents the asynchronous dispose operation. + + + is `false`, otherwise, the inner stream is just flushed. + + Calling `DisposeAsync` allows the resources used by the to be reallocated for other purposes. For more information, see [Cleaning Up Unmanaged Resources](~/docs/standard/garbage-collection/unmanaged.md). + + ]]> + @@ -3597,11 +3609,26 @@ Authentication has not occurred. - To be added. - To be added. - To be added. - To be added. - To be added. + The buffer that receives the bytes read from this stream. + The token to monitor for cancellation requests. + Asynchronously reads data from this stream and stores it in the specified memory range. + A task that represents the asynchronous read operation. The value of its property contains the total number of bytes read into . When there is no more data to be read, returns 0. + + + + Authentication has not occurred. + The read operation failed. Check the inner exception, if present to determine the cause of the failure. + There is already a read operation in progress. + This object has been closed. @@ -3631,13 +3658,38 @@ Authentication has not occurred. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The buffer that receives the bytes read from this stream. + The zero-based location in at which to begin storing the data read from this stream. + The maximum number of bytes to read from this stream. + The token to monitor for cancellation requests. + Asynchronously reads data from this stream and stores it in the specified range of a byte array. + A task that represents the asynchronous read operation. The value of its property contains the total number of bytes read into . When there is no more data to be read, returns 0. + + + + is . + is less than 0. + + -or- + + is less than 0. + + -or- + + is greater than the length of minus . + Authentication has not occurred. + The read operation failed. Check the inner exception, if present to determine the cause of the failure. + There is already a read operation in progress. + This object has been closed. @@ -3663,9 +3715,22 @@ Authentication has not occurred. - To be added. - To be added. - To be added. + Reads a byte from the and advances the position within the stream by one byte, or returns -1 if at the end of the stream. + The unsigned byte cast to an , or -1 if at the end of the stream. + + + + Authentication has not occurred. + The read operation failed. Check the inner exception, if present to determine the cause of the failure. + There is already a read operation in progress. + This object has been closed. @@ -4161,11 +4226,24 @@ Authentication has not occurred. - To be added. - To be added. - To be added. - To be added. - To be added. + The data to write to the underlying stream. + The token to monitor for cancellation requests. + Asynchronously writes data to the underlying stream from a read-only byte memory range. + A task that represents the asynchronous write operation. + + class does not support multiple simultaneous write operations. + + ]]> + + Authentication has not occurred. + The write operation failed. + There is already a write operation in progress. + This object has been closed. @@ -4195,13 +4273,36 @@ Authentication has not occurred. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. - To be added. + The data to write to the underlying stream. + The location in from which to start writing data. + The number of bytes to write to the underlying stream. + The token to monitor for cancellation requests. + Asynchronously writes data to the underlying stream from the specified range of a byte array. + A task that represents the asynchronous write operation. + + class does not support multiple simultaneous write operations. + + ]]> + + is . + is less than 0. + + -or- + + is less than 0. + + -or- + + is greater than the length of minus . + Authentication has not occurred. + The write operation failed. + There is already a write operation in progress. + This object has been closed. From 941cba73e9ed7ba688af4b538dd3f8288e306520 Mon Sep 17 00:00:00 2001 From: David Cantu Date: Tue, 23 Jul 2019 13:46:05 -0700 Subject: [PATCH 2/2] Apply suggestions from code review Addressing PR suggestions. Co-Authored-By: Carlos Sanchez Lopez <1175054+carlossanlop@users.noreply.github.com> Co-Authored-By: Ron Petrusha --- xml/System.Net.Security/AuthenticatedStream.xml | 6 +++--- xml/System.Net.Security/NegotiateStream.xml | 4 ++-- xml/System.Net.Security/SslStream.xml | 10 +++++----- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/xml/System.Net.Security/AuthenticatedStream.xml b/xml/System.Net.Security/AuthenticatedStream.xml index f0825c500e1..6e0e9a0973e 100644 --- a/xml/System.Net.Security/AuthenticatedStream.xml +++ b/xml/System.Net.Security/AuthenticatedStream.xml @@ -188,9 +188,9 @@ The following example demonstrates displaying the properties of an authenticated is `false`, otherwise, the inner stream is just flushed. + This method also disposes the inner stream when is `false`; otherwise, the inner stream is just flushed. Calling `DisposeAsync` allows the resources used by the to be reallocated for other purposes. For more information, see [Cleaning Up Unmanaged Resources](~/docs/standard/garbage-collection/unmanaged.md). @@ -547,4 +547,4 @@ The following example demonstrates displaying the value of this property. - \ No newline at end of file + diff --git a/xml/System.Net.Security/NegotiateStream.xml b/xml/System.Net.Security/NegotiateStream.xml index 73ac20501a6..4d6218ff33b 100644 --- a/xml/System.Net.Security/NegotiateStream.xml +++ b/xml/System.Net.Security/NegotiateStream.xml @@ -2638,7 +2638,7 @@ The following method is called when the operation completes. ## Remarks This method enables you to perform a resource-intensive dispose operation without blocking the main thread. - This method also disposes the inner stream when is `false`, otherwise, the inner stream is just flushed. + This method also disposes the inner stream when is `false`; otherwise, the inner stream is just flushed. Calling `DisposeAsync` allows the resources used by the to be reallocated for other purposes. For more information, see [Cleaning Up Unmanaged Resources](~/docs/standard/garbage-collection/unmanaged.md). @@ -3834,4 +3834,4 @@ Authentication has not occurred. - \ No newline at end of file + diff --git a/xml/System.Net.Security/SslStream.xml b/xml/System.Net.Security/SslStream.xml index b32390fecc9..a79974a04cc 100644 --- a/xml/System.Net.Security/SslStream.xml +++ b/xml/System.Net.Security/SslStream.xml @@ -2451,7 +2451,7 @@ - Asynchronously releases the unmanaged and managed resources used by the . + Asynchronously releases the unmanaged and managed resources used by the . A task that represents the asynchronous dispose operation. @@ -2460,7 +2460,7 @@ ## Remarks This method enables you to perform a resource-intensive dispose operation without blocking the main thread. - This method also disposes the inner stream when is `false`, otherwise, the inner stream is just flushed. + This method also disposes the inner stream when is `false`; otherwise, the inner stream is just flushed. Calling `DisposeAsync` allows the resources used by the to be reallocated for other purposes. For more information, see [Cleaning Up Unmanaged Resources](~/docs/standard/garbage-collection/unmanaged.md). @@ -3626,7 +3626,7 @@ Authentication has not occurred. ]]> Authentication has not occurred. - The read operation failed. Check the inner exception, if present to determine the cause of the failure. + The read operation failed. Check the inner exception, if it is present, to determine the cause of the failure. There is already a read operation in progress. This object has been closed. @@ -3687,7 +3687,7 @@ Authentication has not occurred. is greater than the length of minus . Authentication has not occurred. - The read operation failed. Check the inner exception, if present to determine the cause of the failure. + The read operation failed. Check the inner exception, if it is present, to determine the cause of the failure. There is already a read operation in progress. This object has been closed. @@ -4361,4 +4361,4 @@ The class does not support multiple simulta - \ No newline at end of file +