FakeHostingExtensions.StartAndStopAsync Methode

Definition

Startet den Dienst und beendet den Dienst sofort.

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

Parameter

service
IHostedService

Der getestete Dienst.

cancellationToken
CancellationToken

Abbruchtoken. Siehe CancellationToken.

Gibt zurück

Eine Task, die den asynchronen Vorgang darstellt

Gilt für: