IHostLifetime 接口

定义

跟踪主机生存期。

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

方法

名称 说明
StopAsync(CancellationToken)

StopAsync(CancellationToken) 中调用以指示主机正在停止,是时候关闭了。

WaitForStartAsync(CancellationToken)

在开始时 StartAsync(CancellationToken) 调用,它将等待它完成,然后再继续。 它可用于延迟启动,直到外部事件发出信号。

适用于