BufferedStream.FlushAsync Method (CancellationToken)

.NET Framework (current version)
 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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.

Exception Condition
ObjectDisposedException

The stream has been disposed.

.NET Framework
Available since 4.5
Return to top
Show: