Aracılığıyla paylaş


HostingHostBuilderExtensions.UseConsoleLifetime Yöntem

Tanım

Aşırı Yüklemeler

UseConsoleLifetime(IHostBuilder)

Kapatma işlemini başlatmak için Ctrl+C veya SIGTERM ve çağrıları StopApplication() dinler. Bu, RunAsync ve WaitForShutdownAsync gibi uzantıların engelini kaldırır.

UseConsoleLifetime(IHostBuilder, Action<ConsoleLifetimeOptions>)

Kapatma işlemini başlatmak için Ctrl+C veya SIGTERM ve çağrıları StopApplication() dinler. Bu, RunAsync ve WaitForShutdownAsync gibi uzantıların engelini kaldırır.

UseConsoleLifetime(IHostBuilder)

Kaynak:
HostingHostBuilderExtensions.cs
Kaynak:
HostingHostBuilderExtensions.cs
Kaynak:
HostingHostBuilderExtensions.cs
Kaynak:
HostingHostBuilderExtensions.cs
Kaynak:
HostingHostBuilderExtensions.cs

Kapatma işlemini başlatmak için Ctrl+C veya SIGTERM ve çağrıları StopApplication() dinler. Bu, RunAsync ve WaitForShutdownAsync gibi uzantıların engelini kaldırır.

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

Parametreler

hostBuilder
IHostBuilder

IHostBuilder yapılandırılır.

Döndürülenler

Zincirleme için aynı IHostBuilder örneği.

Öznitelikler

Şunlara uygulanır

UseConsoleLifetime(IHostBuilder, Action<ConsoleLifetimeOptions>)

Kaynak:
HostingHostBuilderExtensions.cs
Kaynak:
HostingHostBuilderExtensions.cs
Kaynak:
HostingHostBuilderExtensions.cs
Kaynak:
HostingHostBuilderExtensions.cs
Kaynak:
HostingHostBuilderExtensions.cs

Kapatma işlemini başlatmak için Ctrl+C veya SIGTERM ve çağrıları StopApplication() dinler. Bu, RunAsync ve WaitForShutdownAsync gibi uzantıların engelini kaldırır.

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

Parametreler

hostBuilder
IHostBuilder

IHostBuilder yapılandırılır.

configureOptions
Action<ConsoleLifetimeOptions>

öğesini yapılandırmak ConsoleLifetimeiçin temsilci.

Döndürülenler

Zincirleme için aynı IHostBuilder örneği.

Öznitelikler

Şunlara uygulanır