HostingAbstractionsHostExtensions.WaitForShutdown(IHost) 方法

定义

阻止调用线程,直至通过 Ctrl+C 或 SIGTERM 触发关闭。Block the calling thread until shutdown is triggered via Ctrl+C or SIGTERM.

public:
[System::Runtime::CompilerServices::Extension]
 static void WaitForShutdown(Microsoft::Extensions::Hosting::IHost ^ host);
public static void WaitForShutdown (this Microsoft.Extensions.Hosting.IHost host);
static member WaitForShutdown : Microsoft.Extensions.Hosting.IHost -> unit
<Extension()>
Public Sub WaitForShutdown (host As IHost)

参数

host
IHost

正在运行的 IHostThe running IHost.

适用于