Condividi tramite


HostingHostBuilderExtensions.UseConsoleLifetime Metodo

Definizione

Overload

UseConsoleLifetime(IHostBuilder)

È in ascolto di CTRL+C o SIGTERM e chiama StopApplication() per avviare il processo di arresto. Sblocca estensioni come RunAsync e WaitForShutdownAsync.

UseConsoleLifetime(IHostBuilder, Action<ConsoleLifetimeOptions>)

È in ascolto di CTRL+C o SIGTERM e chiama StopApplication() per avviare il processo di arresto. Sblocca estensioni come RunAsync e WaitForShutdownAsync.

UseConsoleLifetime(IHostBuilder)

Origine:
HostingHostBuilderExtensions.cs
Origine:
HostingHostBuilderExtensions.cs
Origine:
HostingHostBuilderExtensions.cs

È in ascolto di CTRL+C o SIGTERM e chiama StopApplication() per avviare il processo di arresto. Sblocca estensioni come RunAsync e 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

Parametri

hostBuilder
IHostBuilder

Oggetto IHostBuilder da configurare.

Restituisce

Stessa istanza di IHostBuilder per il concatenamento.

Attributi

Si applica a

UseConsoleLifetime(IHostBuilder, Action<ConsoleLifetimeOptions>)

Origine:
HostingHostBuilderExtensions.cs
Origine:
HostingHostBuilderExtensions.cs
Origine:
HostingHostBuilderExtensions.cs

È in ascolto di CTRL+C o SIGTERM e chiama StopApplication() per avviare il processo di arresto. Sblocca estensioni come RunAsync e 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

Parametri

hostBuilder
IHostBuilder

Oggetto IHostBuilder da configurare.

configureOptions
Action<ConsoleLifetimeOptions>

Delegato per la configurazione di ConsoleLifetime.

Restituisce

Stessa istanza di IHostBuilder per il concatenamento.

Attributi

Si applica a