다음을 통해 공유


HostingHostBuilderExtensions.UseConsoleLifetime 메서드

정의

오버로드

UseConsoleLifetime(IHostBuilder)

Ctrl+C 또는 SIGTERM을 수신 대기하고 StopApplication()을 호출하여 종료 프로세스를 시작합니다. RunAsync 및 WaitForShutdownAsync와 같은 확장의 차단을 해제합니다.

UseConsoleLifetime(IHostBuilder, Action<ConsoleLifetimeOptions>)

Ctrl+C 또는 SIGTERM을 수신 대기하고 StopApplication()을 호출하여 종료 프로세스를 시작합니다. RunAsync 및 WaitForShutdownAsync와 같은 확장의 차단을 해제합니다.

UseConsoleLifetime(IHostBuilder)

Source:
HostingHostBuilderExtensions.cs
Source:
HostingHostBuilderExtensions.cs
Source:
HostingHostBuilderExtensions.cs
Source:
HostingHostBuilderExtensions.cs

Ctrl+C 또는 SIGTERM을 수신 대기하고 StopApplication()을 호출하여 종료 프로세스를 시작합니다. RunAsync 및 WaitForShutdownAsync와 같은 확장의 차단을 해제합니다.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Hosting::IHostBuilder ^ UseConsoleLifetime(Microsoft::Extensions::Hosting::IHostBuilder ^ hostBuilder);
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
public static Microsoft.Extensions.Hosting.IHostBuilder UseConsoleLifetime (this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder);
public static Microsoft.Extensions.Hosting.IHostBuilder UseConsoleLifetime (this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder);
[<System.Runtime.Versioning.UnsupportedOSPlatform("android")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
static member UseConsoleLifetime : Microsoft.Extensions.Hosting.IHostBuilder -> Microsoft.Extensions.Hosting.IHostBuilder
static member UseConsoleLifetime : Microsoft.Extensions.Hosting.IHostBuilder -> Microsoft.Extensions.Hosting.IHostBuilder
<Extension()>
Public Function UseConsoleLifetime (hostBuilder As IHostBuilder) As IHostBuilder

매개 변수

hostBuilder
IHostBuilder

구성할 IHostBuilder입니다.

반환

연결을 위한 IHostBuilder의 동일한 인스턴스입니다.

특성

적용 대상

UseConsoleLifetime(IHostBuilder, Action<ConsoleLifetimeOptions>)

Source:
HostingHostBuilderExtensions.cs
Source:
HostingHostBuilderExtensions.cs
Source:
HostingHostBuilderExtensions.cs
Source:
HostingHostBuilderExtensions.cs
Source:
HostingHostBuilderExtensions.cs

Ctrl+C 또는 SIGTERM을 수신 대기하고 StopApplication()을 호출하여 종료 프로세스를 시작합니다. RunAsync 및 WaitForShutdownAsync와 같은 확장의 차단을 해제합니다.

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Hosting::IHostBuilder ^ UseConsoleLifetime(Microsoft::Extensions::Hosting::IHostBuilder ^ hostBuilder, Action<Microsoft::Extensions::Hosting::ConsoleLifetimeOptions ^> ^ configureOptions);
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
public static Microsoft.Extensions.Hosting.IHostBuilder UseConsoleLifetime (this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, Action<Microsoft.Extensions.Hosting.ConsoleLifetimeOptions> configureOptions);
public static Microsoft.Extensions.Hosting.IHostBuilder UseConsoleLifetime (this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, Action<Microsoft.Extensions.Hosting.ConsoleLifetimeOptions> configureOptions);
[<System.Runtime.Versioning.UnsupportedOSPlatform("android")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
static member UseConsoleLifetime : Microsoft.Extensions.Hosting.IHostBuilder * Action<Microsoft.Extensions.Hosting.ConsoleLifetimeOptions> -> Microsoft.Extensions.Hosting.IHostBuilder
static member UseConsoleLifetime : Microsoft.Extensions.Hosting.IHostBuilder * Action<Microsoft.Extensions.Hosting.ConsoleLifetimeOptions> -> Microsoft.Extensions.Hosting.IHostBuilder
<Extension()>
Public Function UseConsoleLifetime (hostBuilder As IHostBuilder, configureOptions As Action(Of ConsoleLifetimeOptions)) As IHostBuilder

매개 변수

hostBuilder
IHostBuilder

구성할 IHostBuilder입니다.

configureOptions
Action<ConsoleLifetimeOptions>

ConsoleLifetime을 구성하는 대리자입니다.

반환

연결을 위한 IHostBuilder의 동일한 인스턴스입니다.

특성

적용 대상