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
Port System.IO.Pipelines source code comments to Docs (#2304)
* Port System.IO.Pipelines source code comments to Docs
* Update xml/System.IO.Pipelines/PipeReader.xml
Thank you very much for adding the missing returns value.
Co-Authored-By: carlossanlop <[email protected]>
* Update xml/System.IO.Pipelines/PipeReader.xml
Nice catch. Thank you for the correction.
Co-Authored-By: carlossanlop <[email protected]>
* Update xml/System.IO.Pipelines/StreamPipeExtensions.xml
Co-Authored-By: carlossanlop <[email protected]>
* Added missing comments suggested by rpetrusha in PR.
* close tag
* Update PipeWriter.xml
* Update PipeWriter.xml
* Apply suggestions from code review
Suggestions from anurse and mairaw.
Co-Authored-By: carlossanlop <[email protected]>
<paramname="cancellationToken">To be added.</param>
188
-
<summary>To be added.</summary>
189
-
<returns>To be added.</returns>
186
+
<paramname="destination">The stream to which the contents of the current stream will be copied.</param>
187
+
<paramname="cancellationToken">The token to monitor for cancellation requests. The default value is <seecref="P:System.Threading.CancellationToken.None" />.</param>
188
+
<summary>Asynchronously reads the bytes from the <seecref="T:System.IO.Pipelines.PipeReader" /> and writes them to the specified stream, using a specified cancellation token.</summary>
189
+
<returns>A task that represents the asynchronous copy operation.</returns>
Copy file name to clipboardExpand all lines: xml/System.IO.Pipelines/PipeWriter.xml
+40-18Lines changed: 40 additions & 18 deletions
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,7 @@
39
39
</AssemblyInfo>
40
40
<Parameters />
41
41
<Docs>
42
-
<summary>To be added.</summary>
42
+
<summary>Initializes a new instance of the class.</summary>
43
43
<remarks>To be added.</remarks>
44
44
</Docs>
45
45
</Member>
@@ -67,8 +67,8 @@
67
67
<ParameterName="bytes"Type="System.Int32" />
68
68
</Parameters>
69
69
<Docs>
70
-
<paramname="bytes">To be added.</param>
71
-
<summary>To be added.</summary>
70
+
<paramname="bytes">The number of bytes written to the <seecref="T:System.Span`1" /> or <seecref="T:System.Memory`1" />.</param>
71
+
<summary>Notifies the <seecref="T:System.IO.Pipelines.PipeWriter" /> that <paramrefname="bytes" /> bytes were written to the output <seecref="T:System.Span`1" /> or <seecref="T:System.Memory`1" />. You must request a new buffer after calling <seecref="M:System.IO.Pipelines.PipeWriter.Advance(System.Int32)" /> to continue writing more data; you cannot write to a previously acquired buffer.</summary>
72
72
<remarks>To be added.</remarks>
73
73
<inheritdoc />
74
74
</Docs>
@@ -90,8 +90,8 @@
90
90
</ReturnValue>
91
91
<Parameters />
92
92
<Docs>
93
-
<summary>To be added.</summary>
94
-
<returns>To be added.</returns>
93
+
<summary>Returns a write-only <seecref="T:System.IO.Stream" /> that wraps the <seecref="T:System.IO.Pipelines.PipeWriter" />.</summary>
<paramname="cancellationToken">To be added.</param>
165
-
<summary>To be added.</summary>
166
-
<returns>To be added.</returns>
163
+
<paramname="source">The stream from which the contents will be copied.</param>
164
+
<paramname="cancellationToken">The token to monitor for cancellation requests. The default value is <seecref="P:System.Threading.CancellationToken.None" />.</param>
165
+
<summary>Asynchronously reads the bytes from the specified stream and writes them to the <seecref="T:System.IO.Pipelines.PipeWriter" />.</summary>
166
+
<returns>A task that represents the asynchronous copy operation.</returns>
167
167
<remarks>To be added.</remarks>
168
168
</Docs>
169
169
</Member>
@@ -215,10 +215,21 @@
215
215
<ParameterName="sizeHint"Type="System.Int32" />
216
216
</Parameters>
217
217
<Docs>
218
-
<paramname="sizeHint">To be added.</param>
219
-
<summary>To be added.</summary>
220
-
<returns>To be added.</returns>
221
-
<remarks>To be added.</remarks>
218
+
<paramname="sizeHint">The minimum length of the returned <seecref="T:System.Memory`1" />. If 0, a non-empty memory buffer of arbitrary size is returned.</param>
219
+
<summary>Returns a <seecref="T:System.Memory`1" /> to write to that is at least the requested size, as specified by the <paramrefname="sizeHint" /> parameter.</summary>
220
+
<returns>A memory buffer of at least <paramrefname="sizeHint" /> bytes. If <paramrefname="sizeHint" /> is 0, returns a non-empty buffer of arbitrary size.</returns>
221
+
<remarks>
222
+
<formattype="text/markdown"><![CDATA[
223
+
224
+
There is no guarantee that successive calls will return the same buffer or the same-sized buffer.
225
+
226
+
This method never returns <xref:System.Memory`1.Empty?displayProperty=nameWithType>, but it throws an <xref:System.OutOfMemoryException> if the requested buffer size is not available.
227
+
228
+
You must request a new buffer after calling <xref:System.IO.Pipelines.PipeWriter.Advance%2A> to continue writing more data; you cannot write to a previously acquired buffer.
229
+
230
+
]]></format>
231
+
</remarks>
232
+
<exceptioncref="T:System.OutOfMemoryException">The requested buffer size is not available.</exception>
222
233
<inheritdoc />
223
234
</Docs>
224
235
</Member>
@@ -245,10 +256,21 @@
245
256
<ParameterName="sizeHint"Type="System.Int32" />
246
257
</Parameters>
247
258
<Docs>
248
-
<paramname="sizeHint">To be added.</param>
249
-
<summary>To be added.</summary>
250
-
<returns>To be added.</returns>
251
-
<remarks>To be added.</remarks>
259
+
<paramname="sizeHint">The minimum length of the returned <seecref="T:System.Span`1" />. If 0, a non-empty buffer of arbitrary size is returned.</param>
260
+
<summary>Returns a <seecref="T:System.Span`1" /> to write to that is at least the requested size, as specified by the <paramrefname="sizeHint" /> parameter.</summary>
261
+
<returns>A buffer of at least <paramrefname="sizeHint" /> bytes. If <paramrefname="sizeHint" /> is 0, returns a non-empty buffer of arbitrary size.</returns>
262
+
<remarks>
263
+
<formattype="text/markdown"><![CDATA[
264
+
265
+
There is no guarantee that successive calls will return the same buffer or the same-sized buffer.
266
+
267
+
This method never returns <see cref="P:System.Span`1.Empty" />, but it throws an <see cref="T:System.OutOfMemoryException" /> if the requested buffer size is not available.
268
+
269
+
You must request a new buffer after calling <xref:System.IO.Pipelines.PipeWriter.Advance(System.Int32)> to continue writing more data; you cannot write to a previously acquired buffer.
270
+
271
+
]]></format>
272
+
</remarks>
273
+
<exceptioncref="T:System.OutOfMemoryException">The requested buffer size is not available.</exception>
<paramname="cancellationToken">To be added.</param>
43
-
<summary>To be added.</summary>
44
-
<returns>To be added.</returns>
40
+
<paramname="source">The stream from which the contents of the current stream will be copied.</param>
41
+
<paramname="destination">The writer to which the contents of the source stream will be copied.</param>
42
+
<paramname="cancellationToken">The token to monitor for cancellation requests. The default value is <seecref="P:System.Threading.CancellationToken.None" />.</param>
43
+
<summary>Asynchronously reads the bytes from the <seecref="T:System.IO.Stream" /> and writes them to the specified <seecref="T:System.IO.Pipelines.PipeWriter" />, using a cancellation token.</summary>
44
+
<returns>A task that represents the asynchronous copy operation.</returns>
0 commit comments