DeflateStream.FlushAsync(CancellationToken) 方法

定义

异步清理此 Deflate 流的所有缓冲区,并使所有缓冲数据写入基础设备,并且监控取消请求。Asynchronously clears all buffers for this Deflate 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
Public Overrides Function FlushAsync (cancellationToken As CancellationToken) As Task

参数

cancellationToken
CancellationToken

要监视取消请求的标记。The token to monitor for cancellation requests. 默认值为 NoneThe default value is None.

返回

表示异步刷新操作的任务。A task that represents the asynchronous flush operation.

注解

如果在操作完成前取消该操作,则返回的任务将包含 Task.Status 属性的 TaskStatus.Canceled 值。If the operation is canceled before it completes, the returned task contains the TaskStatus.Canceled value for the Task.Status property.

适用于