TaskResult Property

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

Property Value

Type: Object
Result type must be marked with SerializableAttribute.
public class SimpleTask : Task
    public override void Execute()
        this.Result = new MyTaskResult(Environment.MachineName);

// The result object must be 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.4 API for .NET