21.318. Class Worker

Namespace: ArmoniK.Core.Compute.PollingAgent
Assembly: ArmoniK.Core.Compute.PollingAgent.dll

public class Worker : BackgroundService, IHostedService, IDisposable

21.318.1. Inheritance

objectBackgroundServiceWorker

21.318.2. Implements

IHostedService, IDisposable

21.318.3. Inherited Members

BackgroundService.Dispose(), BackgroundService.ExecuteAsync(CancellationToken), BackgroundService.StartAsync(CancellationToken), BackgroundService.StopAsync(CancellationToken), BackgroundService.ExecuteTask, object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

21.318.4. Constructors

21.318.4.1. Worker(Pollster)

public Worker(Pollster pollster)

21.318.4.1.1. Parameters

pollster Pollster

21.318.5. Methods

21.318.5.1. ExecuteAsync(CancellationToken)

This method is called when the starts. The implementation should return a task that represents the lifetime of the long running operation(s) being performed.

protected override Task ExecuteAsync(CancellationToken stoppingToken)

21.318.5.1.1. Parameters

stoppingToken CancellationToken

Triggered when is called.

21.318.5.1.2. Returns

Task

A that represents the long running operations.

21.318.5.1.3. Remarks

See Worker Services in .NET for implementation guidelines.