Skip to content

Commit 21e5455

Browse files
carlossanlopRon Petrusha
authored andcommitted
Manually document System.IO.UnmanagedMemoryStream (#2776)
* Manually document System.IO.UnmanagedMemoryStream * remove extra space
1 parent 4b6849c commit 21e5455

File tree

1 file changed

+16
-20
lines changed

1 file changed

+16
-20
lines changed

xml/System.IO/UnmanagedMemoryStream.xml

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1064,9 +1064,9 @@
10641064
<Parameter Name="destination" Type="System.Span&lt;System.Byte&gt;" Index="0" FrameworkAlternate="netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
10651065
</Parameters>
10661066
<Docs>
1067-
<param name="destination">To be added.</param>
1068-
<summary>To be added.</summary>
1069-
<returns>To be added.</returns>
1067+
<param name="destination">When this method returns, this span contains all the bytes from the unmanaged memory stream.</param>
1068+
<summary>Reads all the bytes of this unmanaged memory stream into the specified span of bytes.</summary>
1069+
<returns>The total number of bytes read into the destination.</returns>
10701070
<remarks>To be added.</remarks>
10711071
</Docs>
10721072
</Member>
@@ -1177,10 +1177,10 @@
11771177
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" Index="1" FrameworkAlternate="netcore-3.0" />
11781178
</Parameters>
11791179
<Docs>
1180-
<param name="buffer">To be added.</param>
1181-
<param name="cancellationToken">To be added.</param>
1182-
<summary>To be added.</summary>
1183-
<returns>To be added.</returns>
1180+
<param name="buffer">When the asynchronous method finishes, this memory region contains all the bytes read from the unmanaged memory stream.</param>
1181+
<param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="P:System.Threading.CancellationToken.None" />.</param>
1182+
<summary>Asynchronously reads the unmanaged memory stream bytes into the memory region.</summary>
1183+
<returns>A task that represents the asynchronous read operation, and wraps the total number of bytes read into the buffer.</returns>
11841184
<remarks>To be added.</remarks>
11851185
</Docs>
11861186
</Member>
@@ -1230,9 +1230,7 @@
12301230
<param name="offset">The byte offset in <paramref name="buffer" /> at which to begin writing data from the stream.</param>
12311231
<param name="count">The maximum number of bytes to read.</param>
12321232
<param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="P:System.Threading.CancellationToken.None" />.</param>
1233-
<summary>Asynchronously reads the specified number of bytes into the specified array.
1234-
1235-
Available starting in .NET Framework 4.6</summary>
1233+
<summary>Asynchronously reads the specified number of bytes into the specified array.</summary>
12361234
<returns>A task that represents the asynchronous read operation. The value of the <paramref name="TResult" /> parameter contains the total number of bytes read into the buffer. The result value can be less than the number of bytes requested if the number of bytes currently available is less than the requested number, or it can be 0 (zero) if the end of the stream has been reached.</returns>
12371235
<remarks>
12381236
<format type="text/markdown"><![CDATA[
@@ -1460,8 +1458,8 @@
14601458
<Parameter Name="source" Type="System.ReadOnlySpan&lt;System.Byte&gt;" Index="0" FrameworkAlternate="netcore-2.1;netcore-2.2;netcore-3.0;netstandard-2.1" />
14611459
</Parameters>
14621460
<Docs>
1463-
<param name="source">To be added.</param>
1464-
<summary>To be added.</summary>
1461+
<param name="source">The span of bytes from which to copy bytes to the current unmanaged memory stream.</param>
1462+
<summary>Writes a block of bytes to the current unmanaged memory stream using data from the provided span of bytes.</summary>
14651463
<remarks>To be added.</remarks>
14661464
</Docs>
14671465
</Member>
@@ -1574,10 +1572,10 @@
15741572
<Parameter Name="cancellationToken" Type="System.Threading.CancellationToken" Index="1" FrameworkAlternate="netcore-3.0" />
15751573
</Parameters>
15761574
<Docs>
1577-
<param name="buffer">To be added.</param>
1578-
<param name="cancellationToken">To be added.</param>
1579-
<summary>To be added.</summary>
1580-
<returns>To be added.</returns>
1575+
<param name="buffer">The buffer to write data from.</param>
1576+
<param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="P:System.Threading.CancellationToken.None" />.</param>
1577+
<summary>Asynchronously writes a span of bytes to the current stream, advances the current position within this stream by the number of bytes written, and monitors cancellation requests.</summary>
1578+
<returns>A task that represents the asynchronous write operation.</returns>
15811579
<remarks>To be added.</remarks>
15821580
</Docs>
15831581
</Member>
@@ -1627,9 +1625,7 @@
16271625
<param name="offset">The zero-based byte offset in <paramref name="buffer" /> from which to begin copying bytes to the stream.</param>
16281626
<param name="count">The maximum number of bytes to write.</param>
16291627
<param name="cancellationToken">The token to monitor for cancellation requests. The default value is <see cref="P:System.Threading.CancellationToken.None" />.</param>
1630-
<summary>Asynchronously writes a sequence of bytes to the current stream, advances the current position within this stream by the number of bytes written, and monitors cancellation requests.
1631-
1632-
Available starting in .NET Framework 4.6</summary>
1628+
<summary>Asynchronously writes a sequence of bytes to the current stream, advances the current position within this stream by the number of bytes written, and monitors cancellation requests.</summary>
16331629
<returns>A task that represents the asynchronous write operation.</returns>
16341630
<remarks>
16351631
<format type="text/markdown"><![CDATA[
@@ -1708,4 +1704,4 @@
17081704
</Docs>
17091705
</Member>
17101706
</Members>
1711-
</Type>
1707+
</Type>

0 commit comments

Comments
 (0)