語言

HostOptions.ShutdownTimeout 屬性

定義

取得或設定預設 StopAsync(CancellationToken)的逾時。

public:
 property TimeSpan ShutdownTimeout { TimeSpan get(); void set(TimeSpan value); };
public TimeSpan ShutdownTimeout { get; set; }
member this.ShutdownTimeout : TimeSpan with get, set
Public Property ShutdownTimeout As TimeSpan

屬性值

備註

此逾時同時涵蓋所有實作 StoppingAsync(CancellationToken)StoppedAsync(CancellationToken)的主機服務。

適用於