C# Class fCraft.Scheduler

A general-purpose task scheduler.
Afficher le fichier Open project: GlennMR/800craft Class Usage Examples

Méthodes publiques

Méthode Description
NewBackgroundTask ( [ callback ) : SchedulerTask

Creates a new SchedulerTask object to run in the background thread. Use this if your task is not very time-sensitive or frequent, or if your callback is resource-intensive.

NewBackgroundTask ( [ callback, [ userState ) : SchedulerTask

Creates a new SchedulerTask object to run in the background thread. Use this if your task is not very time-sensitive or frequent, or if your callback is resource-intensive.

NewTask ( [ callback ) : SchedulerTask

Creates a new SchedulerTask object to run in the main thread. Use this if your task is time-sensitive or frequent, and your callback won't take too long to execute.

NewTask ( [ callback, [ userState ) : SchedulerTask

Creates a new SchedulerTask object to run in the main thread. Use this if your task is time-sensitive or frequent, and your callback won't take too long to execute.

PrintTasks ( [ player ) : void

Private Methods

Méthode Description
AddTask ( [ task ) : void

Schedules a given task for execution.

BackgroundLoop ( ) : void
BeginShutdown ( ) : void
EndShutdown ( ) : void
FireEvent ( EventHandler eventToFire, SchedulerTask task ) : void
MainLoop ( ) : void
Start ( ) : void
UpdateCache ( ) : void

Method Details

NewBackgroundTask() public static méthode

Creates a new SchedulerTask object to run in the background thread. Use this if your task is not very time-sensitive or frequent, or if your callback is resource-intensive.
public static NewBackgroundTask ( [ callback ) : SchedulerTask
callback [ Method to call when the task is triggered.
Résultat SchedulerTask

NewBackgroundTask() public static méthode

Creates a new SchedulerTask object to run in the background thread. Use this if your task is not very time-sensitive or frequent, or if your callback is resource-intensive.
public static NewBackgroundTask ( [ callback, [ userState ) : SchedulerTask
callback [ Method to call when the task is triggered.
userState [ Parameter to pass to the method.
Résultat SchedulerTask

NewTask() public static méthode

Creates a new SchedulerTask object to run in the main thread. Use this if your task is time-sensitive or frequent, and your callback won't take too long to execute.
public static NewTask ( [ callback ) : SchedulerTask
callback [ Method to call when the task is triggered.
Résultat SchedulerTask

NewTask() public static méthode

Creates a new SchedulerTask object to run in the main thread. Use this if your task is time-sensitive or frequent, and your callback won't take too long to execute.
public static NewTask ( [ callback, [ userState ) : SchedulerTask
callback [ Method to call when the task is triggered.
userState [ Parameter to pass to the method.
Résultat SchedulerTask

PrintTasks() public static méthode

public static PrintTasks ( [ player ) : void
player [
Résultat void