Class RepeatableActionWorker
Performs repeatable async action until cancelled.
Inheritance
System.Object
RepeatableActionWorker
Implements
Inherited Members
Namespace: Eco.Core.Utils.Threading
Assembly: Eco.Core.dll
Syntax
public class RepeatableActionWorker : RepeatableWorkerBase, IWorker
Constructors
RepeatableActionWorker(Func<CancellationToken, Task>)
Declaration
public RepeatableActionWorker(Func<CancellationToken, Task> repeatableAction)
Parameters
Type | Name | Description |
---|---|---|
System.Func<System.Threading.CancellationToken, System.Threading.Tasks.Task> | repeatableAction |
Properties
RepeatableAction
Declaration
protected Func<CancellationToken, Task> RepeatableAction { get; }
Property Value
Type | Description |
---|---|
System.Func<System.Threading.CancellationToken, System.Threading.Tasks.Task> |
Methods
DoRepeatableWork(CancellationToken)
Performs repeatable work, may be cancelled with token
.
Declaration
protected override Task DoRepeatableWork(CancellationToken token)
Parameters
Type | Name | Description |
---|---|---|
System.Threading.CancellationToken | token |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |