public Task Handle( ApplicationEnd notification, CancellationToken cancellationToken) { return(Task.CompletedTask); }
protected virtual void OnApplicationEnd(object sender, EventArgs evargs) { ApplicationEnd?.Invoke(this, EventArgs.Empty); }
void Application_End(object sender, EventArgs e) { // 在应用程序关闭时运行的代码 ApplicationEnd.End(); }