Method | Description | |
---|---|---|
ThreadedBackgroundTask ( ) : System |
The default constructor.
|
Method | Description | |
---|---|---|
DoWork ( object p_objArgs ) : object |
The method that is called to start the backgound task.
|
|
DoWork ( object p_objArgs, string &p_strMessage ) : object |
The method that is called to start the backgound task.
|
|
OnTaskEnded ( |
Raises the IBackgroundTask.TaskEnded event. This signals the StartWait(bool, object[]) method that the task has ended, and makes the return value accessible to said method. |
|
Start ( ) : void |
Starts the task in a foreground thread.
|
|
Start ( bool p_booRunInBackground ) : void |
Starts the task, optionally in a background thread. If the task is started in a background thread, the task will be terminated in the calling thread terminates. Otherwise, the calling thread will not terminate until the task completes. |
|
StartWait ( ) : object |
Starts the task in a foreground thread, and waits until the task completes.
|
|
StartWait ( bool p_booRunInBackground ) : object |
Starts the task, optionally in a background thread, and waits until the task completes. If the task is started in a background thread, the task will be terminated in the calling thread terminates. Otherwise, the calling thread will not terminate until the task completes. |
Method | Description | |
---|---|---|
EndThreadInvokeHandler ( IAsyncResult p_asrResult ) : void |
The callback use by the BeginInvoke method that runs the work in the background.
|
|
RunThread ( object p_objArgs ) : void |
A wrapper to the work method called by the thread to start the work.
|
|
RunThreadedWork ( object p_objArgs ) : object |
protected DoWork ( object p_objArgs ) : object | ||
p_objArgs | object | Arguments to for the task execution. |
return | object |
protected DoWork ( object p_objArgs, string &p_strMessage ) : object | ||
p_objArgs | object | Arguments to for the task execution. |
p_strMessage | string | The message describing the state of the task. |
return | object |
protected OnTaskEnded ( |
||
e | A |
|
return | void |
protected Start ( bool p_booRunInBackground ) : void | ||
p_booRunInBackground | bool | Whether the task should be run in a background thread. |
return | void |
protected StartWait ( bool p_booRunInBackground ) : object | ||
p_booRunInBackground | bool | Whether the task should be run in a background thread. |
return | object |