Class ActionWorker
Wraps asynchronous action to IWorker interface.
Inheritance
System.Object
ActionWorker
Assembly: Eco.Core.dll
Syntax
public class ActionWorker : WorkerBase, IWorker
Constructors
ActionWorker(Func<CancellationToken, Task>)
Declaration
public ActionWorker(Func<CancellationToken, Task> asyncFunc)
Parameters
Type |
Name |
Description |
System.Func<System.Threading.CancellationToken, System.Threading.Tasks.Task> |
asyncFunc |
|
Methods
DoWork(CancellationToken)
Actual work performed in this method.
Declaration
protected sealed override Task DoWork(CancellationToken token)
Parameters
Type |
Name |
Description |
System.Threading.CancellationToken |
token |
|
Returns
Type |
Description |
System.Threading.Tasks.Task |
|
Overrides
Implements
Extension Methods