HostingHostBuilderExtensions.UseConsoleLifetime メソッド

定義

オーバーロード

UseConsoleLifetime(IHostBuilder)

Ctrl + C または SIGTERM をリッスンし、StopApplication() を呼び出してシャットダウン プロセスを開始します。 これは、RunAsync や WaitForShutdownAsync などの拡張機能のブロックを解除します。

UseConsoleLifetime(IHostBuilder, Action<ConsoleLifetimeOptions>)

Ctrl + C または SIGTERM をリッスンし、StopApplication() を呼び出してシャットダウン プロセスを開始します。 これは、RunAsync や WaitForShutdownAsync などの拡張機能のブロックを解除します。

UseConsoleLifetime(IHostBuilder)

ソース:
HostingHostBuilderExtensions.cs
ソース:
HostingHostBuilderExtensions.cs
ソース:
HostingHostBuilderExtensions.cs
ソース:
HostingHostBuilderExtensions.cs

Ctrl + C または SIGTERM をリッスンし、StopApplication() を呼び出してシャットダウン プロセスを開始します。 これは、RunAsync や WaitForShutdownAsync などの拡張機能のブロックを解除します。

public:
[System::Runtime::CompilerServices::Extension]
 static Microsoft::Extensions::Hosting::IHostBuilder ^ UseConsoleLifetime(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")]
public static Microsoft.Extensions.Hosting.IHostBuilder UseConsoleLifetime (this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder);
static member UseConsoleLifetime : Microsoft.Extensions.Hosting.IHostBuilder -> Microsoft.Extensions.Hosting.IHostBuilder
[<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
<Extension()>
Public Function UseConsoleLifetime (hostBuilder As IHostBuilder) As IHostBuilder

パラメーター

hostBuilder
IHostBuilder

構成する IHostBuilder

戻り値

チェーン用の IHostBuilder の同じインスタンス。

属性

適用対象

UseConsoleLifetime(IHostBuilder, Action<ConsoleLifetimeOptions>)

ソース:
HostingHostBuilderExtensions.cs
ソース:
HostingHostBuilderExtensions.cs
ソース:
HostingHostBuilderExtensions.cs
ソース:
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);
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")]
public static Microsoft.Extensions.Hosting.IHostBuilder UseConsoleLifetime (this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, Action<Microsoft.Extensions.Hosting.ConsoleLifetimeOptions> configureOptions);
static member UseConsoleLifetime : Microsoft.Extensions.Hosting.IHostBuilder * Action<Microsoft.Extensions.Hosting.ConsoleLifetimeOptions> -> Microsoft.Extensions.Hosting.IHostBuilder
[<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
<Extension()>
Public Function UseConsoleLifetime (hostBuilder As IHostBuilder, configureOptions As Action(Of ConsoleLifetimeOptions)) As IHostBuilder

パラメーター

hostBuilder
IHostBuilder

構成する IHostBuilder

configureOptions
Action<ConsoleLifetimeOptions>

ConsoleLifetimeを構成するためのデリゲート。

戻り値

チェーン用の IHostBuilder の同じインスタンス。

属性

適用対象