Empeld
Empeld plugin documentation.
pluginbase.Objects.Tasks.EnumerableTask< T > Class Template Reference

Enumerates over a list and runs a evaluator for each item as part of a scheduled task More...

Inheritance diagram for pluginbase.Objects.Tasks.EnumerableTask< T >:
pluginbase.Objects.Tasks.ITask

Public Member Functions

 EnumerableTask (IEnumerable< T > e, Func< T, TaskResult > eval, TimeSpan iterationFrequency)
 
 EnumerableTask (IEnumerable< T > e, Action< T > eval, TimeSpan iterationFrequency)
 

Additional Inherited Members

- Properties inherited from pluginbase.Objects.Tasks.ITask
TimeSpan Frequency [get]
 

Detailed Description

Enumerates over a list and runs a evaluator for each item as part of a scheduled task

Constructor & Destructor Documentation

◆ EnumerableTask() [1/2]

pluginbase.Objects.Tasks.EnumerableTask< T >.EnumerableTask ( IEnumerable< T >  e,
Func< T, TaskResult eval,
TimeSpan  iterationFrequency 
)
15  {
16  _iter = e.GetEnumerator();
17  _eval = eval;
18  _frequency = iterationFrequency;
19  }

◆ EnumerableTask() [2/2]

pluginbase.Objects.Tasks.EnumerableTask< T >.EnumerableTask ( IEnumerable< T >  e,
Action< T >  eval,
TimeSpan  iterationFrequency 
)
22  : this(e, (item) => {
23  eval(item);
24  return TaskResult.Continue;
25  }, iterationFrequency)
26  { }
TaskResult
The result of a scheduled task
Definition: TaskResult.cs:8

The documentation for this class was generated from the following file: