Gets or sets Task's execution result.
Namespace: AGI.Parallel.Infrastructure
Assembly: AGI.Parallel.Infrastructure (in AGI.Parallel.Infrastructure.dll) Version: 1.2.0.275 (1.2.0.275)

Syntax

C#
public virtual Object Result { get; set; }
Visual Basic
Public Overridable Property Result As Object
        Get
        Set

Remarks

Result type must be marked with SerializableAttribute.

Examples

  Copy imageCopy
[Serializable]
public class SimpleTask : Task
{
    public override void Execute()
    {
        this.Result = new MyTaskResult(Environment.MachineName);
    }
}

// The result object must be serializable
[Serializable]
public class MyTaskResult
{
    public DateTime Time;
    public string MachineName;
    public int TickCount;

    public MyTaskResult(string machineName)
    {
        Time = DateTime.Now;
        MachineName = machineName;
        TickCount = Environment.TickCount;
    }
}

See Also