C# Class Schyntax.Schtick

显示文件 Open project: schyntax/cs-schtick Class Usage Examples

Public Methods

Method Description
AddAsyncTask ( string name, Schyntax.Schedule schedule, ScheduledTaskAsyncCallback asyncCallback, bool autoRun = true, DateTimeOffset lastKnownEvent = default(DateTimeOffset), System.TimeSpan window = default(TimeSpan) ) : ScheduledTask

Adds a scheduled task to this instance of Schtick.

AddAsyncTask ( string name, string schedule, ScheduledTaskAsyncCallback asyncCallback, bool autoRun = true, DateTimeOffset lastKnownEvent = default(DateTimeOffset), System.TimeSpan window = default(TimeSpan) ) : ScheduledTask

Adds a scheduled task to this instance of Schtick.

AddTask ( string name, Schyntax.Schedule schedule, ScheduledTaskCallback callback, bool autoRun = true, DateTimeOffset lastKnownEvent = default(DateTimeOffset), System.TimeSpan window = default(TimeSpan) ) : ScheduledTask

Adds a scheduled task to this instance of Schtick.

AddTask ( string name, string schedule, ScheduledTaskCallback callback, bool autoRun = true, DateTimeOffset lastKnownEvent = default(DateTimeOffset), TimeSpan window = default(TimeSpan) ) : ScheduledTask

Adds a scheduled task to this instance of Schtick.

GetAllTasks ( ) : ScheduledTask[]
RemoveTask ( string name ) : bool
Schtick ( ) : System
Shutdown ( ) : Task
TryGetTask ( string name, ScheduledTask &task ) : bool

Private Methods

Method Description
AddPendingEvent ( PendingEvent ev ) : void
AddTaskImpl ( string name, Schedule schedule, ScheduledTaskCallback callback, ScheduledTaskAsyncCallback asyncCallback, bool autoRun, DateTimeOffset lastKnownEvent, TimeSpan window ) : ScheduledTask
Poll ( ) : Task
PopAndRunEvents ( DateTimeOffset intendedTime ) : void
TaskOnOnException ( ScheduledTask task, Exception ex ) : void

Method Details

AddAsyncTask() public method

Adds a scheduled task to this instance of Schtick.
public AddAsyncTask ( string name, Schyntax.Schedule schedule, ScheduledTaskAsyncCallback asyncCallback, bool autoRun = true, DateTimeOffset lastKnownEvent = default(DateTimeOffset), System.TimeSpan window = default(TimeSpan) ) : ScheduledTask
name string A unique name for this task. If null, a guid will be used.
schedule Schyntax.Schedule A Schyntax Schedule object.
asyncCallback ScheduledTaskAsyncCallback Function which will be called each time the task is supposed to run.
autoRun bool If true, Start() will be called on the task automatically.
lastKnownEvent DateTimeOffset The last Date when the task is known to have run. Used for Task Windows.
window System.TimeSpan /// The period of time after an event should have run where it would still be appropriate to run it. /// See Task Windows documentation for more details. ///
return ScheduledTask

AddAsyncTask() public method

Adds a scheduled task to this instance of Schtick.
public AddAsyncTask ( string name, string schedule, ScheduledTaskAsyncCallback asyncCallback, bool autoRun = true, DateTimeOffset lastKnownEvent = default(DateTimeOffset), System.TimeSpan window = default(TimeSpan) ) : ScheduledTask
name string A unique name for this task. If null, a guid will be used.
schedule string A Schyntax schedule string.
asyncCallback ScheduledTaskAsyncCallback Function which will be called each time the task is supposed to run.
autoRun bool If true, Start() will be called on the task automatically.
lastKnownEvent DateTimeOffset The last Date when the task is known to have run. Used for Task Windows.
window System.TimeSpan /// The period of time after an event should have run where it would still be appropriate to run it. /// See Task Windows documentation for more details. ///
return ScheduledTask

AddTask() public method

Adds a scheduled task to this instance of Schtick.
public AddTask ( string name, Schyntax.Schedule schedule, ScheduledTaskCallback callback, bool autoRun = true, DateTimeOffset lastKnownEvent = default(DateTimeOffset), System.TimeSpan window = default(TimeSpan) ) : ScheduledTask
name string A unique name for this task. If null, a guid will be used.
schedule Schyntax.Schedule A Schyntax Schedule object.
callback ScheduledTaskCallback Function which will be called each time the task is supposed to run.
autoRun bool If true, Start() will be called on the task automatically.
lastKnownEvent DateTimeOffset The last Date when the task is known to have run. Used for Task Windows.
window System.TimeSpan /// The period of time after an event should have run where it would still be appropriate to run it. /// See Task Windows documentation for more details. ///
return ScheduledTask

AddTask() public method

Adds a scheduled task to this instance of Schtick.
public AddTask ( string name, string schedule, ScheduledTaskCallback callback, bool autoRun = true, DateTimeOffset lastKnownEvent = default(DateTimeOffset), TimeSpan window = default(TimeSpan) ) : ScheduledTask
name string A unique name for this task. If null, a guid will be used.
schedule string A Schyntax schedule string.
callback ScheduledTaskCallback Function which will be called each time the task is supposed to run.
autoRun bool If true, Start() will be called on the task automatically.
lastKnownEvent DateTimeOffset The last Date when the task is known to have run. Used for Task Windows.
window TimeSpan /// The period of time after an event should have run where it would still be appropriate to run it. /// See Task Windows documentation for more details. ///
return ScheduledTask

GetAllTasks() public method

public GetAllTasks ( ) : ScheduledTask[]
return ScheduledTask[]

RemoveTask() public method

public RemoveTask ( string name ) : bool
name string
return bool

Schtick() public method

public Schtick ( ) : System
return System

Shutdown() public method

public Shutdown ( ) : Task
return Task

TryGetTask() public method

public TryGetTask ( string name, ScheduledTask &task ) : bool
name string
task ScheduledTask
return bool