Task Class |
Namespace: AGI.Parallel.Infrastructure
The Task type exposes the following members.
Name | Description | |
---|---|---|
Id |
Gets the unique handle of task.
| |
IsCancelling |
Gets a value indicating whether this task is cancelling.
| |
IsFinishedTaskStatus |
Gets a value indicating whether this task is finished.
| |
Name |
Gets or sets the display name of the task.
| |
Properties |
Gets the properties of the task.
| |
Result |
Gets or sets Task's execution result.
| |
StandardError |
Gets the standard error of the host that executed the task.
| |
StandardOutput |
Gets the standard output of the host that executed the task.
| |
TaskCancellationMessage |
Gets the optional task cancellation message.
| |
TaskCancellationReason |
Gets the reason why the task was canceled.
| |
TaskStatus |
Gets the task status.
|
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Execute |
Main entry point into Task when it is run on a Host.
| |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
GetProperty(String) |
Returns property value by name. You can find common values for properties using TaskProperties.
| |
GetPropertyT(String) |
Returns property value by name. You can find common values for properties using TaskProperties.
| |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
RemoveProperty |
Removes the property from the property bag. You can find common values for properties using TaskProperties.
| |
SetProgress(Int32) |
Sets progress of task. This value will be returned with AGI.Parallel.Client.Job.TaskProgressUpdated event.
| |
SetProgress(Int32, Object) |
Sets progress of task. This value will be returned with AGI.Parallel.Client.Job.TaskProgressUpdated event.
| |
SetProperty(String, Object) |
Sets properties on Task. You can find common values for properties using TaskProperties.
| |
SetPropertyT(String, T) |
Sets property value. You can find common values for properties using TaskProperties.
| |
ToString |
Returns a String that represents this instance.
(Overrides ObjectToString.) |
Name | Description | |
---|---|---|
Completed |
An event that is raised when this task is completed.
| |
ProgressUpdated |
An event that is raised when this task's progress
is updated.
| |
StatusChanged |
An event that is raised when this task's TaskStatus changes.
|
// You must always make the Task class serializable [Serializable] public class SimpleTask : Task { // The instance of the class is automatically serialized with the task private int a; private int b; public SimpleTask(int first, int second) { a = first; b = second; } public override void Execute() { // Put your application logic in the Execute method Result = a + b; } }
STK Parallel Computing Server 2.9 API for .NET