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
<paramname="destination">The stream to which the contents of the current buffered stream will be copied.</param>
651
+
<paramname="bufferSize">The size of the buffer. This value must be greater than zero. The default size is 81920.</param>
652
+
<summary>Reads the bytes from the current buffered stream and writes them to another stream.</summary>
653
653
<remarks>To be added.</remarks>
654
+
<exceptioncref="T:System.ArgumentNullException"><paramrefname="destination" /> is <seelangword="null" />.</exception>
655
+
<exceptioncref="T:System.ArgumentOutOfRangeException"><paramrefname="bufferSize" /> is negative or zero.</exception>
656
+
<exceptioncref="T:System.NotSupportedException">The current stream does not support reading.
657
+
658
+
-or-
659
+
660
+
<paramrefname="destination" /> does not support writing.</exception>
661
+
<exceptioncref="T:System.ObjectDisposedException">Either the current stream or <paramrefname="destination" /> was closed before the <seecref="M:System.IO.Stream.CopyTo(System.IO.Stream)" /> method was called.</exception>
<paramname="cancellationToken">To be added.</param>
688
-
<summary>To be added.</summary>
689
-
<returns>To be added.</returns>
690
-
<remarks>To be added.</remarks>
694
+
<paramname="destination">The stream to which the contents of the current buffered stream will be copied.</param>
695
+
<paramname="bufferSize">The size, in bytes, of the buffer. This value must be greater than zero. The default sizer is 81920.</param>
696
+
<paramname="cancellationToken">The token to monitor for cancellation requests. The default value is <seecref="P:System.Threading.CancellationToken.None" />.</param>
697
+
<summary>Asynchronously reads the bytes from the current buffered stream and writes them to another stream, using a specified buffer size and cancellation token.</summary>
698
+
<returns>A task that represents the asynchronous copy operation.</returns>
699
+
<remarks>
700
+
<formattype="text/markdown"><] app or [!INCLUDE[desktop_appname](~/includes/desktop-appname-md.md)] app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#.
705
+
706
+
If the operation is canceled before it completes, the returned task contains the <xref:System.Threading.Tasks.TaskStatus.Canceled> value for the <xref:System.Threading.Tasks.Task.Status%2A> property.
707
+
708
+
Copying begins at the current position in the current stream.
<paramname="disposing"><seelangword="true" /> to release both managed and unmanaged resources; <seelangword="false" /> to release only unmanaged resources.</param>
750
+
<summary>Releases the unmanaged resources used by the buffered stream and optionally releases the managed resources.</summary>
751
+
<remarks>
752
+
<formattype="text/markdown"><![CDATA[
753
+
754
+
## Remarks
755
+
756
+
You should release all resources by specifying `true` for `disposing`. When `disposing` is `true`, the stream can also ensure data is flushed to the underlying buffer, and access other finalizable objects. This may not be possible when called from a finalizer due a lack of ordering among finalizers.
757
+
758
+
If your stream is using an operating system handle to communicate with its source, consider using a subclass of <xref:System.Runtime.InteropServices.SafeHandle> for this purpose.
759
+
760
+
This method is called by the public <xref:System.ComponentModel.Component.Dispose> method and the <xref:System.Object.Finalize%2A> method. <xref:System.ComponentModel.Component.Dispose> invokes the protected `Dispose(Boolean)` method with the `disposing` parameter set to `true`. <xref:System.Object.Finalize%2A> invokes `Dispose(Boolean)` with `disposing` set to `false`.
761
+
762
+
]]></format>
763
+
</remarks>
731
764
</Docs>
732
765
</Member>
733
766
<MemberMemberName="DisposeAsync">
@@ -757,9 +790,21 @@ bufStream->Close();
757
790
</ReturnValue>
758
791
<Parameters />
759
792
<Docs>
760
-
<summary>To be added.</summary>
761
-
<returns>To be added.</returns>
762
-
<remarks>To be added.</remarks>
793
+
<summary>Asynchronously releases the unmanaged resources used by the buffered stream.</summary>
794
+
<returns>A task that represents the asynchronous dispose operation.</returns>
795
+
<remarks>
796
+
<formattype="text/markdown"><] app or [!INCLUDE[desktop_appname](~/includes/desktop-appname-md.md)] app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#.
801
+
802
+
This method disposes the stream by writing any changes to the backing store and closing the stream to release resources.
803
+
804
+
Calling `DisposeAsync` allows the resources used by the <xref:System.IO.BufferedStream> to be reallocated for other purposes. For more information, see [Cleaning Up Unmanaged Resources](~/docs/standard/garbage-collection/unmanaged.md).
<paramname="destination">A region of memory. When this method returns, the contents of this region are replaced by the bytes read from the current source.</param>
1146
+
<summary>Copies bytes from the current buffered stream to a byte span and advances the position within the buffered stream by the number of bytes read.</summary>
1147
+
<returns>The total number of bytes read into the buffer. This can be less than the number of bytes allocated in the buffer if that many bytes are not currently available, or zero (0) if the end of the stream has been reached.</returns>
1148
+
<remarks>
1149
+
<formattype="text/markdown"><] app or [!INCLUDE[desktop_appname](~/includes/desktop-appname-md.md)] app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#.
1283
+
1284
+
Use the <xref:System.IO.BufferedStream.CanRead%2A> property to determine whether the current instance supports reading.
1285
+
1286
+
If the operation is canceled before it completes, the returned task contains the <xref:System.Threading.Tasks.TaskStatus.Canceled?displayProperty=nameWithType> value for the <xref:System.Threading.Tasks.Task.Status> property.
1287
+
1288
+
]]></format>
1289
+
</remarks>
1221
1290
</Docs>
1222
1291
</Member>
1223
1292
<MemberMemberName="ReadAsync">
@@ -1483,8 +1552,8 @@ bufStream->Close();
1483
1552
<ReturnType>System.IO.Stream</ReturnType>
1484
1553
</ReturnValue>
1485
1554
<Docs>
1486
-
<summary>To be added.</summary>
1487
-
<value>To be added.</value>
1555
+
<summary>Gets the underlying <seecref="T:System.IO.Stream" /> instance for this buffered stream.</summary>
<paramname="buffer">A region of memory. This method copies the contents of this region to the current buffered stream.</param>
1589
+
<summary>Writes a sequence of bytes to the current buffered stream and advances the current position within this buffered stream by the number of bytes written.</summary>
1590
+
<remarks>
1591
+
<formattype="text/markdown"><] app or [!INCLUDE[desktop_appname](~/includes/desktop-appname-md.md)] app where a time-consuming stream operation can block the UI thread and make your app appear as if it is not working. The async methods are used in conjunction with the `async` and `await` keywords in Visual Basic and C#.
1714
+
1715
+
Use the <xref:System.IO.BufferedStream.CanWrite%2A> property to determine whether the current instance supports writing.
1716
+
1717
+
If the operation is canceled before it completes, the returned task contains the <xref:System.Threading.Tasks.TaskStatus.Canceled?displayProperty=nameWithType> value for the <xref:System.Threading.Tasks.Task.Status%2A?displayProperty=nameWithType> property.
1718
+
1719
+
]]></format>
1720
+
</remarks>
1630
1721
</Docs>
1631
1722
</Member>
1632
1723
<MemberMemberName="WriteAsync">
@@ -1727,7 +1818,15 @@ bufStream->Close();
1727
1818
<Docs>
1728
1819
<paramname="value">A byte to write to the stream.</param>
1729
1820
<summary>Writes a byte to the current position in the buffered stream.</summary>
1730
-
<remarks>To be added.</remarks>
1821
+
<remarks>
1822
+
<formattype="text/markdown"><![CDATA[
1823
+
1824
+
## Remarks
1825
+
1826
+
Use the <xref:System.IO.BufferedStream.CanWrite%2A> property to determine whether the current instance supports writing.
1827
+
1828
+
]]></format>
1829
+
</remarks>
1731
1830
<exceptioncref="T:System.NotSupportedException">The stream does not support writing.</exception>
1732
1831
<exceptioncref="T:System.ArgumentNullException">
1733
1832
<paramrefname="value" /> is <seelangword="null" />.</exception>
0 commit comments