Represents the task environment in the system. The task environment provides common methods to run before and after Task is run.
Namespace: AGI.Parallel.Infrastructure
Assembly: AGI.Parallel.Infrastructure (in AGI.Parallel.Infrastructure.dll) Version: 1.2.0.275 (1.2.0.275)

Syntax

C#
[SerializableAttribute]
public abstract class TaskEnvironment
Visual Basic
<SerializableAttribute> _
Public MustInherit Class TaskEnvironment

Remarks

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.

Examples

  Copy imageCopy
// You must always make the TaskEnvironment class serializable
[Serializable]
public class MyEnvironment : TaskEnvironment
{
    public override void Setup()
    {
        // Put your common setup logic in the Setup method
    }

    public override void Teardown()
    {
        // Put your common teardown logic in the Teardown method
    }
}

Inheritance Hierarchy

System..::..Object
  AGI.Parallel.Infrastructure..::..TaskEnvironment
    AGI.Parallel.Infrastructure..::..DefaultTaskEnvironment

See Also