Property | Type | Description | |
---|---|---|---|
intervalTimer | |||
taskAction | System.Action | ||
taskThread | Thread |
Method | Description | |
---|---|---|
CreateTask ( System.Action taskAction ) : |
Creates a new IntervalTask (and doesn't run it - call SetTimerInterval() to start it). taskAction format: context => { /* do work */ } If a task has already been created, throws a FieldAccessException.
|
|
Dispose ( ) : void |
Stops the Timer, and informs the ASP.Net hosting environment that it doesn't need to wait on the IntervalTask to shut down.
|
|
SetInterval ( int interval ) : void |
If the background task timer is running, changes its interval. If the timer isn't running, starts the timer (and so, the background task).
|
|
Stop ( bool immediate ) : void |
Call if the app is shutting down. Should only be called by the ASP.Net container.
|
|
StopTimer ( ) : void |
Stops the timer. If the background task is running when this is called, it's left be so it can finish it's work, but will not be woken up to start again until SetTimerInterval() is called with a positive value. Convenience method. This has the same effect as calling SetTimerInterval(Timeout.Infinite);
|
Method | Description | |
---|---|---|
IntervalTask ( System.Action taskAction ) : System | ||
intervalCallback ( ) : void | ||
taskActionWrapper ( ) : void |
public static CreateTask ( System.Action taskAction ) : |
||
taskAction | System.Action | An Action to be run on an interval |
return |
protected IntervalTask ( System.Action taskAction ) : System | ||
taskAction | System.Action | |
return | System |
public SetInterval ( int interval ) : void | ||
interval | int | The timer interval in milliseconds. |
return | void |
public Stop ( bool immediate ) : void | ||
immediate | bool | ASP.Net sets this to false first, then to true the second /// call 30 seconds later. |
return | void |
protected TimerInfo,Brass9.Threading intervalTimer | ||
return |