共用方式為


HttpResponse.StartAsync(CancellationToken) 方法

定義

呼叫 OnStarting () 並讓標頭無法修改,以啟動回應。

public virtual System.Threading.Tasks.Task StartAsync (System.Threading.CancellationToken cancellationToken = default);
abstract member StartAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task
override this.StartAsync : System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Overridable Function StartAsync (Optional cancellationToken As CancellationToken = Nothing) As Task

參數

cancellationToken
CancellationToken

傳回

備註

Microsoft.AspNetCore.Http.Features.IHttpResponseStartFeature如果未設定 ,StartAsync 預設會呼叫 HttpResponse.Body.FlushAsync () 。

適用於