C# Class CodeSoda.Scheduler.Scheduler

Manages Tasks and the schedule that defines when they will run in the background
Inheritance: IScheduler, IDisposable
Show file Open project: codesoda/Scheduler

Public Properties

Property Type Description
DefaultFrequency int

Public Methods

Method Description
AddTask ( ITask task, Schedule schedule ) : void

Adds a task onto the schedule so it will be checked and run as defined by the schedule

Dispose ( ) : void

Close and clean up any opened resources

Scheduler ( ) : System

Instantiate a new Scheduler to run background tasks using the DefaultFrequency

Scheduler ( int frequency ) : System

Instantiate a new Scheduler to run background tasks

Start ( ) : void

Start checking if schedules are due to run their tasks

Stop ( ) : void

Stop schedules checking if they are due to run

Private Methods

Method Description
Timer_Tick ( object obj ) : void

Method Details

AddTask() public method

Adds a task onto the schedule so it will be checked and run as defined by the schedule
public AddTask ( ITask task, Schedule schedule ) : void
task ITask The task to run
schedule Schedule The schedule that determines when the task should run
return void

Dispose() public method

Close and clean up any opened resources
public Dispose ( ) : void
return void

Scheduler() public method

Instantiate a new Scheduler to run background tasks using the DefaultFrequency
public Scheduler ( ) : System
return System

Scheduler() public method

Instantiate a new Scheduler to run background tasks
public Scheduler ( int frequency ) : System
frequency int The number of seconds that must elapse between checking for tasks to run
return System

Start() public method

Start checking if schedules are due to run their tasks
public Start ( ) : void
return void

Stop() public method

Stop schedules checking if they are due to run
public Stop ( ) : void
return void

Property Details

DefaultFrequency public static property

This is the Default Frequency for any Schedulers created without a specific frequency.
public static int DefaultFrequency
return int