Represents an individual task in the system. The task provides the function to run remotely.
Namespace: AGI.Parallel.Infrastructure
Assembly: AGI.Parallel.Infrastructure (in AGI.Parallel.Infrastructure.dll) Version: (


public abstract class Task
Visual Basic
<SerializableAttribute> _
Public MustInherit Class Task


You must implement this class so that it can be serialized by the .NET binary serializer. Add the SerializableAttribute attribute to your class and any other fields that this class references.


  Copy imageCopy
// You must always make the Task class 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;

Inheritance Hierarchy


See Also