Export (0) Print
Expand All

BufferedStream.FlushAsync Method (CancellationToken)

.NET Framework 4.5

Asynchronously clears all buffers for this stream, causes any buffered data to be written to the underlying device, and monitors cancellation requests.

Namespace:  System.IO
Assembly:  mscorlib (in mscorlib.dll)

public override Task FlushAsync(
	CancellationToken cancellationToken
)

Parameters

cancellationToken
Type: System.Threading.CancellationToken

The token to monitor for cancellation requests.

Return Value

Type: System.Threading.Tasks.Task
A task that represents the asynchronous flush operation.

ExceptionCondition
ObjectDisposedException

The stream has been disposed.

.NET Framework

Supported in: 4.6, 4.5
Show:
© 2015 Microsoft