HostingHostBuilderExtensions.RunConsoleAsync Yöntem

Tanım

Aşırı Yüklemeler

RunConsoleAsync(IHostBuilder, CancellationToken)

Konsol desteğini etkinleştirir, konağı derleyip başlatır ve Ctrl+C veya SIGTERM'nin kapatılmasını bekler.

RunConsoleAsync(IHostBuilder, Action<ConsoleLifetimeOptions>, CancellationToken)

Konsol desteğini etkinleştirir, konağı derleyip başlatır ve Ctrl+C veya SIGTERM'nin kapatılmasını bekler.

RunConsoleAsync(IHostBuilder, CancellationToken)

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

Konsol desteğini etkinleştirir, konağı derleyip başlatır ve Ctrl+C veya SIGTERM'nin kapatılmasını bekler.

public static System.Threading.Tasks.Task RunConsoleAsync (this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, System.Threading.CancellationToken cancellationToken = default);
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
public static System.Threading.Tasks.Task RunConsoleAsync (this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, System.Threading.CancellationToken cancellationToken = default);
static member RunConsoleAsync : Microsoft.Extensions.Hosting.IHostBuilder * System.Threading.CancellationToken -> System.Threading.Tasks.Task
[<System.Runtime.Versioning.UnsupportedOSPlatform("android")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
static member RunConsoleAsync : Microsoft.Extensions.Hosting.IHostBuilder * System.Threading.CancellationToken -> System.Threading.Tasks.Task
<Extension()>
Public Function RunConsoleAsync (hostBuilder As IHostBuilder, Optional cancellationToken As CancellationToken = Nothing) As Task

Parametreler

hostBuilder
IHostBuilder

IHostBuilder yapılandırılır.

cancellationToken
CancellationToken

CancellationToken Konsolunu iptal etmek için kullanılabilecek bir.

Döndürülenler

Task Yalnızca belirteç sinyallendiğinde veya uygulama kapatıldığında tamamlanır.

Öznitelikler

Özel durumlar

İptal belirteci iptal edildi. Bu özel durum, döndürülen görevde depolanır.

Şunlara uygulanır

RunConsoleAsync(IHostBuilder, Action<ConsoleLifetimeOptions>, CancellationToken)

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

Konsol desteğini etkinleştirir, konağı derleyip başlatır ve Ctrl+C veya SIGTERM'nin kapatılmasını bekler.

public static System.Threading.Tasks.Task RunConsoleAsync (this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, Action<Microsoft.Extensions.Hosting.ConsoleLifetimeOptions> configureOptions, System.Threading.CancellationToken cancellationToken = default);
[System.Runtime.Versioning.UnsupportedOSPlatform("android")]
[System.Runtime.Versioning.UnsupportedOSPlatform("browser")]
[System.Runtime.Versioning.UnsupportedOSPlatform("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatform("tvos")]
public static System.Threading.Tasks.Task RunConsoleAsync (this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, Action<Microsoft.Extensions.Hosting.ConsoleLifetimeOptions> configureOptions, System.Threading.CancellationToken cancellationToken = default);
static member RunConsoleAsync : Microsoft.Extensions.Hosting.IHostBuilder * Action<Microsoft.Extensions.Hosting.ConsoleLifetimeOptions> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
[<System.Runtime.Versioning.UnsupportedOSPlatform("android")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("browser")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("ios")>]
[<System.Runtime.Versioning.UnsupportedOSPlatform("tvos")>]
static member RunConsoleAsync : Microsoft.Extensions.Hosting.IHostBuilder * Action<Microsoft.Extensions.Hosting.ConsoleLifetimeOptions> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
<Extension()>
Public Function RunConsoleAsync (hostBuilder As IHostBuilder, configureOptions As Action(Of ConsoleLifetimeOptions), Optional cancellationToken As CancellationToken = Nothing) As Task

Parametreler

hostBuilder
IHostBuilder

IHostBuilder yapılandırılır.

configureOptions
Action<ConsoleLifetimeOptions>

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

cancellationToken
CancellationToken

CancellationToken Konsolunu iptal etmek için kullanılabilecek bir.

Döndürülenler

Task Yalnızca belirteç sinyallendiğinde veya uygulama kapatıldığında tamamlanır.

Öznitelikler

Özel durumlar

İptal belirteci iptal edildi. Bu özel durum, döndürülen görevde depolanır.

Şunlara uygulanır