Class RecalculationService
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
startupRequirementsStartupRequirementsscopeFactoryIServiceScopeFactory
Properties
IsCancelling
public bool IsCancelling { get; }
Property Value
IsRunning
public bool IsRunning { get; }
Property Value
IsTerminated
public bool IsTerminated { get; }
Property Value
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
stoppingTokenCancellationTokenTriggered when StopAsync(CancellationToken) is called.
Returns
Remarks
See Worker Services in .NET for implementation guidelines.
Report(Status)
Reports a progress update.
public void Report(Status value)
Parameters
valueStatusThe value of the updated progress.
Start(IEnumerable<IEntityInfo>?)
public void Start(IEnumerable<IEntityInfo>? types = null)
Parameters
typesIEnumerable<IEntityInfo>
Subscribe(IProgress<Status>)
public void Subscribe(IProgress<Status> progress)
Parameters
Unsubscribe(IProgress<Status>)
public void Unsubscribe(IProgress<Status> progress)