Click or drag to resize

TaskResult Property

Gets or sets Task's execution result.

Namespace:  AGI.Parallel.Infrastructure
Assembly:  AGI.Parallel.Infrastructure (in AGI.Parallel.Infrastructure.dll) Version: 2.9.0.1601 (2.9.0.1601)
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 Parallel Computing Server 2.9 API for .NET