C# Class Sharplike.Core.Scheduling.AbstractSimpleScheduler

The abstract class for any simple scheduler (using either single or multi-threaded models). Any scheduler that inherits from AbstractSimpleScheduler should dispatch tasks in the order they are added to the scheduler. (Note, of course, that in multi-threaded models they may not return in the same order.)
Inheritance: IScheduler
显示文件 Open project: eropple/sharplike

Protected Properties

Property Type Description
tasks List

Public Methods

Method Description
AbstractSimpleScheduler ( ) : System

Constructor.

AddTask ( IScheduledTask task ) : void

Adds a task to the scheduler.

ClearTasks ( ) : void

Clears all tasks from the scheduler.

Process ( ) : void

Processes the scheduler. This should not be called in end user code unless the end user knows exactly what they're doing.

RemoveTask ( IScheduledTask task ) : System.Boolean

Removes a task from the scheduler. Is a fail-safe function; will not throw an exception if the task was not there to begin with.

Method Details

AbstractSimpleScheduler() public method

Constructor.
public AbstractSimpleScheduler ( ) : System
return System

AddTask() public method

Adds a task to the scheduler.
public AddTask ( IScheduledTask task ) : void
task IScheduledTask The task to add to the scheduler.
return void

ClearTasks() public method

Clears all tasks from the scheduler.
public ClearTasks ( ) : void
return void

Process() public abstract method

Processes the scheduler. This should not be called in end user code unless the end user knows exactly what they're doing.
public abstract Process ( ) : void
return void

RemoveTask() public method

Removes a task from the scheduler. Is a fail-safe function; will not throw an exception if the task was not there to begin with.
public RemoveTask ( IScheduledTask task ) : System.Boolean
task IScheduledTask The task to remove from the scheduler.
return System.Boolean

Property Details

tasks protected_oe property

protected List tasks
return List