C# Класс Schyntax.Schtick

Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

AddAsyncTask() публичный Метод

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. ///
Результат ScheduledTask

AddAsyncTask() публичный Метод

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. ///
Результат ScheduledTask

AddTask() публичный Метод

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. ///
Результат ScheduledTask

AddTask() публичный Метод

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. ///
Результат ScheduledTask

GetAllTasks() публичный Метод

public GetAllTasks ( ) : ScheduledTask[]
Результат ScheduledTask[]

RemoveTask() публичный Метод

public RemoveTask ( string name ) : bool
name string
Результат bool

Schtick() публичный Метод

public Schtick ( ) : System
Результат System

Shutdown() публичный Метод

public Shutdown ( ) : Task
Результат Task

TryGetTask() публичный Метод

public TryGetTask ( string name, ScheduledTask &task ) : bool
name string
task ScheduledTask
Результат bool