diff --git a/xml/System.IO/Stream.xml b/xml/System.IO/Stream.xml index 42e2770d3e7..a8655fd4cc8 100644 --- a/xml/System.IO/Stream.xml +++ b/xml/System.IO/Stream.xml @@ -895,11 +895,22 @@ - To be added. - To be added. - To be added. - To be added. - To be added. + The stream to which the contents of the current stream will be copied. + The token to monitor for cancellation requests. The default value is . + Asynchronously reads the bytes from the current stream and writes them to another stream, using a specified cancellation token. + A task that represents the asynchronous copy operation. + method enables you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in a [!INCLUDE[win8_appname_long](~/includes/win8-appname-long-md.md)] 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#. + + If the operation is canceled before it completes, the returned task contains the value for the property. + + Copying begins at the current position in the current stream. + + For an example of copying between two streams, see the overload. + + ]]> @@ -1184,9 +1195,20 @@ - To be added. - To be added. - To be added. + Asynchronously releases the unmanaged resources used by the . + A task that represents the asynchronous dispose operation. + + method enables you to perform a resource-intensive dispose operation without blocking the main thread. This performance consideration is particularly important in a [!INCLUDE[win8_appname_long](~/includes/win8-appname-long-md.md)] 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#. + + This method disposes the stream by writing any changes to the backing store and closing the stream to release resources. + + 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). + + ]]> + @@ -1717,10 +1739,21 @@ - To be added. - To be added. - To be added. - To be added. + A region of memory. When this method returns, the contents of this region are replaced by the bytes read from the current source. + When overridden in a derived class, reads a sequence of bytes from the current stream and advances the position within the stream by the number of bytes read. + 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. + + property to determine whether the current instance supports reading. Use the method to read asynchronously from the current stream. + + Implementations of this method read a maximum of `buffer.Length` bytes from the current stream and store them in `buffer`. The current position within the stream is advanced by the number of bytes read; however, if an exception occurs, the current position within the stream remains unchanged. Implementations return the number of bytes read. The implementation will block until at least one byte of data can be read, in the event that no data is available. returns 0 only when there is no more data in the stream and no more is expected (such as a closed socket or end of file). An implementation is free to return fewer bytes than requested even if the end of the stream has not been reached. + + Use for reading primitive data types. + + ]]> + @@ -1841,11 +1874,24 @@ - To be added. - To be added. - To be added. - To be added. - To be added. + The region of memory to write the data into. + The token to monitor for cancellation requests. The default value is . + Asynchronously reads a sequence of bytes from the current stream, advances the position within the stream by the number of bytes read, and monitors cancellation requests. + A task that represents the asynchronous read operation. The value of its property contains the total number of bytes read into the buffer. The result value can be less than the number of bytes allocated in the buffer if that many bytes are not currently available, or it can be 0 (zero) if the end of the stream has been reached. + + method enables you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in a [!INCLUDE[win8_appname_long](~/includes/win8-appname-long-md.md)] 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#. + + Use the property to determine whether the current instance supports reading. + + If the operation is canceled before it completes, the returned task contains the value for the property. + + For an example, see the overload. + + ]]> + @@ -2350,9 +2396,18 @@ This member is an explicit interface member implementation. It can be used only - To be added. - To be added. - To be added. + A region of memory. This method copies the contents of this region to the current stream. + When overridden in a derived class, writes a sequence of bytes to the current stream and advances the current position within this stream by the number of bytes written. + + property to determine whether the current instance supports writing. Use the method to write asynchronously to the current stream. + + If the write operation is successful, the position within the stream advances by the number of bytes written. If an exception occurs, the position within the stream remains unchanged. + + ]]> + @@ -2462,11 +2517,24 @@ This member is an explicit interface member implementation. It can be used only - To be added. - To be added. - To be added. - To be added. - To be added. + The region of memory to write data from. + The token to monitor for cancellation requests. The default value is . + 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. + A task that represents the asynchronous write operation. + + method enables you to perform resource-intensive I/O operations without blocking the main thread. This performance consideration is particularly important in a [!INCLUDE[win8_appname_long](~/includes/win8-appname-long-md.md)] 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#. + + Use the property to determine whether the current instance supports writing. + + If the operation is canceled before it completes, the returned task contains the value for the property. + + For an example, see the overload. + + ]]> + @@ -2727,4 +2795,4 @@ This member is an explicit interface member implementation. It can be used only - \ No newline at end of file +