Skip to content
Jef King edited this page Jun 27, 2018 · 4 revisions

Factory

Add the Task Finder Factory to your Role Task Manager, to emit tasks based on the attributes placed on your code. Note that the Configuration class below should be a class within the library that you have attribute based tasks in.

new RoleTaskManager<Configuration>(new TaskFinderFactory<Configuration>());

Initialization

If you have code that you want to run once on load, this is the easiest way to get that code to fire once.

[Initialize]
public void Initialize()
{
}

Runs Every

This is a recurring task that will happen every X number of seconds.

[RunsEvery(10)]
public void Recurring()
{
}

Runs Between

This is for tasks which will change their frequency depending on if work was done. When work is consistent they will run at the fastest; if there is no work being done, they will gradually back off.

[RunsBetween(1, 500)]
public bool Dynamic()
{
    return true;
}
Clone this wiki locally