HostingHostBuilderExtensions.RunConsoleAsync Methode

Definition

Überlädt

Name Beschreibung
RunConsoleAsync(IHostBuilder, CancellationToken)

Ermöglicht die Konsolenunterstützung, -builds und startet den Host, und wartet, bis STRG+C oder SIGTERM heruntergefahren wird.

RunConsoleAsync(IHostBuilder, Action<ConsoleLifetimeOptions>, CancellationToken)

Ermöglicht die Konsolenunterstützung, -builds und startet den Host, und wartet, bis STRG+C oder SIGTERM heruntergefahren wird.

RunConsoleAsync(IHostBuilder, CancellationToken)

Quelle:
HostingHostBuilderExtensions.cs
Quelle:
HostingHostBuilderExtensions.cs
Quelle:
HostingHostBuilderExtensions.cs
Quelle:
HostingHostBuilderExtensions.cs

Ermöglicht die Konsolenunterstützung, -builds und startet den Host, und wartet, bis STRG+C oder SIGTERM heruntergefahren wird.

[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);
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")>]
static member RunConsoleAsync : Microsoft.Extensions.Hosting.IHostBuilder * System.Threading.CancellationToken -> System.Threading.Tasks.Task
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

Parameter

hostBuilder
IHostBuilder

Der IHostBuilder zu konfigurierende

cancellationToken
CancellationToken

Eine CancellationToken , die zum Abbrechen der Konsole verwendet werden kann.

Gibt zurück

Ein Task Vorgang, der nur abgeschlossen wird, wenn das Token ausgelöst oder heruntergefahren wird.

Attribute

Ausnahmen

Das Abbruchtoken wurde abgebrochen. Diese Ausnahme wird in der zurückgegebenen Aufgabe gespeichert.

Gilt für:

RunConsoleAsync(IHostBuilder, Action<ConsoleLifetimeOptions>, CancellationToken)

Quelle:
HostingHostBuilderExtensions.cs
Quelle:
HostingHostBuilderExtensions.cs
Quelle:
HostingHostBuilderExtensions.cs
Quelle:
HostingHostBuilderExtensions.cs

Ermöglicht die Konsolenunterstützung, -builds und startet den Host, und wartet, bis STRG+C oder SIGTERM heruntergefahren wird.

[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);
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")>]
static member RunConsoleAsync : Microsoft.Extensions.Hosting.IHostBuilder * Action<Microsoft.Extensions.Hosting.ConsoleLifetimeOptions> * System.Threading.CancellationToken -> System.Threading.Tasks.Task
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

Parameter

hostBuilder
IHostBuilder

Der IHostBuilder zu konfigurierende

configureOptions
Action<ConsoleLifetimeOptions>

Der Delegat zum Konfigurieren der ConsoleLifetime.

cancellationToken
CancellationToken

Eine CancellationToken , die zum Abbrechen der Konsole verwendet werden kann.

Gibt zurück

Ein Task Vorgang, der nur abgeschlossen wird, wenn das Token ausgelöst oder heruntergefahren wird.

Attribute

Ausnahmen

Das Abbruchtoken wurde abgebrochen. Diese Ausnahme wird in der zurückgegebenen Aufgabe gespeichert.

Gilt für: