Class AbpTimer
A robust timer implementation that ensures no overlapping occurs. It waits exactly specified Period between ticks.
Inheritance
System.Object
AbpTimer
Assembly: Volo.Abp.Threading.dll
Syntax
public class AbpTimer : object, ITransientDependency
Constructors
AbpTimer()
Declaration
Properties
ExceptionNotifier
Declaration
public IExceptionNotifier ExceptionNotifier { get; set; }
Property Value
Logger
Declaration
public ILogger<AbpTimer> Logger { get; set; }
Property Value
Period
Task period of timer (as milliseconds).
Declaration
public int Period { get; set; }
Property Value
Type |
Description |
System.Int32 |
|
RunOnStart
Indicates whether timer raises Elapsed event on Start method of Timer for once.
Default: False.
Declaration
public bool RunOnStart { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Methods
Start(CancellationToken)
Declaration
public void Start(CancellationToken cancellationToken = null)
Parameters
Type |
Name |
Description |
CancellationToken |
cancellationToken |
|
Stop(CancellationToken)
Declaration
public void Stop(CancellationToken cancellationToken = null)
Parameters
Type |
Name |
Description |
CancellationToken |
cancellationToken |
|
Events
Elapsed
This event is raised periodically according to Period of Timer.
Declaration
public event EventHandler Elapsed
Event Type
Type |
Description |
EventHandler |
|
Implements
Extension Methods