Provides data for the TaskStateChanged event.
Namespace: AGI.Parallel.Client
Assembly: AGI.Parallel.Client (in AGI.Parallel.Client.dll) Version: 1.2.0.275 (1.2.0.275)

Syntax

C#
public class TaskStatusChangedEventArgs : EventArgs
Visual Basic
Public Class TaskStatusChangedEventArgs _
        Inherits EventArgs

Examples

  Copy imageCopy
using System;
using AGI.Parallel.Client;
using AGI.Parallel.Infrastructure;

namespace CodeSamples
{
    class Program
    {
        static void Main(string[] args)
        {
            using (IJobScheduler scheduler = new ClusterJobScheduler("localhost"))
            {
                scheduler.Connect();

                Job job = scheduler.CreateJob();
                job.AddTask(new OurTask());
                job.TaskStateChanged += new EventHandler<TaskStatusChangedEventArgs>(OnTaskStatusChangedEventHandler);
                job.Submit();
                job.WaitUntilDone();
            }
        }

        private static void OnTaskStatusChangedEventHandler(object sender, TaskStatusChangedEventArgs taskState)
        {
            Console.WriteLine("Task Name: " + taskState.Task.Name);
            Console.WriteLine("Status changed from " + taskState.PreviousStatus + " to " + taskState.NewStatus);
        }
    }

    [Serializable]
    class OurTask : Task
    {
        public override void Execute()
        {
        }
    }
}

Inheritance Hierarchy

System..::..Object
  System..::..EventArgs
    AGI.Parallel.Client..::..TaskStatusChangedEventArgs

See Also