BufferedStream.FlushAsync(CancellationToken) 方法

定義

以非同步的方式清除這個資料流的所有緩衝區,造成所有緩衝資料都寫入基礎裝置,並且監視取消要求。Asynchronously clears all buffers for this stream, causes any buffered data to be written to the underlying device, and monitors cancellation requests.

public:
 override System::Threading::Tasks::Task ^ FlushAsync(System::Threading::CancellationToken cancellationToken);
public override System.Threading.Tasks.Task FlushAsync (System.Threading.CancellationToken cancellationToken);
override this.FlushAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task

參數

cancellationToken
CancellationToken

用來監視是否有取消要求的語彙基元。The token to monitor for cancellation requests.

傳回

表示非同步排清作業的工作。A task that represents the asynchronous flush operation.

例外狀況

資料流已經處置。The stream has been disposed.

適用於