Class HostedServiceBase
- Namespace
- Oqtane.Infrastructure
- Assembly
- Oqtane.Server.dll
public abstract class HostedServiceBase
- Inheritance
-
HostedServiceBase
- Derived
Constructors
HostedServiceBase(IServiceScopeFactory)
public HostedServiceBase(IServiceScopeFactory serviceScopeFactory)
Parameters
serviceScopeFactory
IServiceScopeFactory
Properties
EndDate
public DateTime? EndDate { get; set; }
Property Value
Frequency
public string Frequency { get; set; }
Property Value
Interval
public int Interval { get; set; }
Property Value
IsEnabled
public bool IsEnabled { get; set; }
Property Value
Name
public string Name { get; set; }
Property Value
RetentionHistory
public int RetentionHistory { get; set; }
Property Value
StartDate
public DateTime? StartDate { get; set; }
Property Value
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
public void Dispose()
ExecuteAsync(CancellationToken)
protected Task ExecuteAsync(CancellationToken stoppingToken)
Parameters
stoppingToken
CancellationToken
Returns
ExecuteJob(IServiceProvider)
public virtual string ExecuteJob(IServiceProvider provider)
Parameters
provider
IServiceProvider
Returns
ExecuteJobAsync(IServiceProvider)
public virtual Task<string> ExecuteJobAsync(IServiceProvider provider)
Parameters
provider
IServiceProvider
Returns
StartAsync(CancellationToken)
Triggered when the application host is ready to start the service.
public Task StartAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenIndicates that the start process has been aborted.
Returns
StopAsync(CancellationToken)
Triggered when the application host is performing a graceful shutdown.
public Task StopAsync(CancellationToken cancellationToken)
Parameters
cancellationToken
CancellationTokenIndicates that the shutdown process should no longer be graceful.