Table of Contents

Class RecalculationService

Namespace
The.Web.Shell
Assembly
Instagile.Web.Client.dll
public class RecalculationService : BackgroundService, IHostedService, IDisposable, IRecalculationService, IProgress<Status>
Inheritance
RecalculationService
Implements
Inherited Members

Constructors

RecalculationService(StartupRequirements, IServiceScopeFactory)

public RecalculationService(StartupRequirements startupRequirements, IServiceScopeFactory scopeFactory)

Parameters

startupRequirements StartupRequirements
scopeFactory IServiceScopeFactory

Properties

IsCancelling

public bool IsCancelling { get; }

Property Value

bool

IsRunning

public bool IsRunning { get; }

Property Value

bool

IsTerminated

public bool IsTerminated { get; }

Property Value

bool

Methods

Cancel()

public void Cancel()

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public override void Dispose()

ExecuteAsync(CancellationToken)

This method is called when the IHostedService 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)

Parameters

stoppingToken CancellationToken

Triggered when StopAsync(CancellationToken) is called.

Returns

Task

A Task that represents the long running operations.

Remarks

See Worker Services in .NET for implementation guidelines.

Report(Status)

Reports a progress update.

public void Report(Status value)

Parameters

value Status

The value of the updated progress.

Start(IEnumerable<IEntityInfo>?)

public void Start(IEnumerable<IEntityInfo>? types = null)

Parameters

types IEnumerable<IEntityInfo>

Subscribe(IProgress<Status>)

public void Subscribe(IProgress<Status> progress)

Parameters

progress IProgress<Status>

Unsubscribe(IProgress<Status>)

public void Unsubscribe(IProgress<Status> progress)

Parameters

progress IProgress<Status>