FakeHostingExtensions.StartAndStopAsync Metodo

Definizione

Avvia e arresta immediatamente il servizio.

public static System.Threading.Tasks.Task StartAndStopAsync (this Microsoft.Extensions.Hosting.IHostedService service, System.Threading.CancellationToken cancellationToken = default);
static member StartAndStopAsync : Microsoft.Extensions.Hosting.IHostedService * System.Threading.CancellationToken -> System.Threading.Tasks.Task
<Extension()>
Public Function StartAndStopAsync (service As IHostedService, Optional cancellationToken As CancellationToken = Nothing) As Task

Parametri

service
IHostedService

Servizio testato.

cancellationToken
CancellationToken

Token di annullamento. Vedere CancellationToken.

Restituisce

Task che rappresenta l'operazione asincrona.

Si applica a