Show / Hide Table of Contents

Class AbpTimer

A robust timer implementation that ensures no overlapping occurs. It waits exactly specified Period between ticks.

Inheritance
System.Object
AbpTimer
Implements
ITransientDependency
Namespace: Volo.Abp.Threading
Assembly: Volo.Abp.Threading.dll
Syntax
public class AbpTimer : object, ITransientDependency

Constructors

AbpTimer()

Declaration
public AbpTimer()

Properties

ExceptionNotifier

Declaration
public IExceptionNotifier ExceptionNotifier { get; set; }
Property Value
Type Description
IExceptionNotifier

Logger

Declaration
public ILogger<AbpTimer> Logger { get; set; }
Property Value
Type Description
ILogger<AbpTimer>

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

ITransientDependency

Extension Methods

AbpObjectExtensions.As<T>(Object)
AbpObjectExtensions.To<T>(Object)
AbpObjectExtensions.IsIn<T>(T, T[])
AbpObjectExtensions.If<T>(T, Boolean, Func<T, T>)
AbpObjectExtensions.If<T>(T, Boolean, Action<T>)
LockExtensions.Locking(Object, Action)
LockExtensions.Locking<T>(T, Action<T>)
LockExtensions.Locking<TResult>(Object, Func<TResult>)
LockExtensions.Locking<T, TResult>(T, Func<T, TResult>)
Back to top Powered by Volosoft