TaskResult Property

Gets or sets Task's execution result.
Namespace:  AGI.Parallel.Infrastructure
Assembly:  AGI.Parallel.Infrastructure (in AGI.Parallel.Infrastructure.dll) Version: 1.3.0.366 (1.3.0.366)
Syntax
public virtual Object Result { get; set; }

Property Value

Type: Object
Remarks
Result type must be marked with SerializableAttribute.
Examples
[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

STK Scalability 1.3 API for .NET