IHostApplicationLifetime 接口

定义

允许通知使用者应用程序生存期事件。Allows consumers to be notified of application lifetime events.

public interface class IHostApplicationLifetime
public interface IHostApplicationLifetime
type IHostApplicationLifetime = interface
Public Interface IHostApplicationLifetime

属性

ApplicationStarted

在应用程序主机完全启动时触发。Triggered when the application host has fully started.

ApplicationStopped

当应用程序主机执行正常关闭时触发。Triggered when the application host is performing a graceful shutdown. 在此事件完成之前,关闭将被阻止。Shutdown will block until this event completes.

ApplicationStopping

当应用程序主机执行正常关闭时触发。Triggered when the application host is performing a graceful shutdown. 在此事件完成之前,关闭将被阻止。Shutdown will block until this event completes.

方法

StopApplication()

当前应用程序请求终止。Requests termination of the current application.

适用于