共用方式為


HostingAbstractionsHostExtensions.WaitForShutdown(IHost) 方法

定義

封鎖呼叫線程,直到透過 Ctrl+C 或 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

執行中的 IHost

適用於