IHostLifetime 介面

定義

public interface class IHostLifetime
public interface IHostLifetime
type IHostLifetime = interface
Public Interface IHostLifetime
衍生

方法

StopAsync(CancellationToken)

StopAsync(CancellationToken) 呼叫以指出主機正在停止中,且現在即可關機。Called from StopAsync(CancellationToken) to indicate that the host is stopping and it's time to shut down.

WaitForStartAsync(CancellationToken)

StartAsync(CancellationToken) 開始時呼叫,這會等到完成後再繼續進行。Called at the start of StartAsync(CancellationToken) which will wait until it's complete before continuing. 這可用來將啟動延遲到外部事件發出訊號為止。This can be used to delay startup until signaled by an external event.

適用於