Class RecurringHostedServiceBase
Inheritance
System.Object
Assembly: cs.temp.dll.dll
Syntax
public abstract class RecurringHostedServiceBase : IHostedService, IDisposable
Constructors
RecurringHostedServiceBase(ILogger, TimeSpan, TimeSpan)
Declaration
protected RecurringHostedServiceBase(ILogger logger, TimeSpan period, TimeSpan delay)
Parameters
Type |
Name |
Description |
ILogger |
logger |
Logger.
|
System.TimeSpan |
period |
Timespan representing how often the task should recur.
|
System.TimeSpan |
delay |
Timespan representing the initial delay after application start-up before the first run of the task occurs.
|
RecurringHostedServiceBase(TimeSpan, TimeSpan)
Declaration
[Obsolete("Please use constructor that takes an ILogger instead")]
protected RecurringHostedServiceBase(TimeSpan period, TimeSpan delay)
Parameters
Type |
Name |
Description |
System.TimeSpan |
period |
|
System.TimeSpan |
delay |
|
Fields
DefaultDelay
The default delay to use for recurring tasks for the first run after application start-up if no alternative is configured.
Declaration
protected static readonly TimeSpan DefaultDelay
Field Value
Type |
Description |
System.TimeSpan |
|
Methods
Dispose()
Declaration
Dispose(Boolean)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type |
Name |
Description |
System.Boolean |
disposing |
|
ExecuteAsync(Object)
Declaration
public async void ExecuteAsync(object state)
Parameters
Type |
Name |
Description |
System.Object |
state |
The task state.
|
Declaration
public abstract Task PerformExecuteAsync(object state)
Parameters
Type |
Name |
Description |
System.Object |
state |
|
Returns
StartAsync(CancellationToken)
Declaration
public Task StartAsync(CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
CancellationToken |
cancellationToken |
|
Returns
StopAsync(CancellationToken)
Declaration
public Task StopAsync(CancellationToken cancellationToken)
Parameters
Type |
Name |
Description |
CancellationToken |
cancellationToken |
|
Returns