HostingAbstractionsHostBuilderExtensions.StartAsync Método

Definición

Compila e inicia el host.

public static System.Threading.Tasks.Task<Microsoft.Extensions.Hosting.IHost> StartAsync (this Microsoft.Extensions.Hosting.IHostBuilder hostBuilder, System.Threading.CancellationToken cancellationToken = default);
static member StartAsync : Microsoft.Extensions.Hosting.IHostBuilder * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Extensions.Hosting.IHost>
<Extension()>
Public Function StartAsync (hostBuilder As IHostBuilder, Optional cancellationToken As CancellationToken = Nothing) As Task(Of IHost)

Parámetros

hostBuilder
IHostBuilder

La interfaz IHostBuilder que se va a iniciar.

cancellationToken
CancellationToken

Se puede usar una instancia de CancellationToken para cancelar el inicio.

Devoluciones

Task<IHost>

Objeto IHost iniciado.

Se aplica a