API

BackgroundService.ExecuteAsync

Defines the background worker lifetime.

Formal Syntax & Structure

csharp syntaxcsharp
protected override Task ExecuteAsync(CancellationToken stoppingToken)

Working Example

Example Snippetcsharp
// Documentary fragment; see mapped lesson for context.protected override Task ExecuteAsync(CancellationToken stoppingToken)
C# & .NET Reference