Click or drag to resize

JobCompletedEventArgs Class

Provides data for the JobCompleted event.
Inheritance Hierarchy
SystemObject
  SystemEventArgs
    AGI.Parallel.ClientJobCompletedEventArgs

Namespace:  AGI.Parallel.Client
Assembly:  AGI.Parallel.Client (in AGI.Parallel.Client.dll) Version: 2.9.0.1601 (2.9.0.1601)
Syntax
public sealed class JobCompletedEventArgs : EventArgs

The JobCompletedEventArgs type exposes the following members.

Properties
  NameDescription
Public propertyJob
Gets the job that completed.
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Examples
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.JobCompleted += new EventHandler<JobCompletedEventArgs>(OnJobCompletedHandler);
                job.Submit();
                job.WaitUntilDone();
            }
        }

        private static void OnJobCompletedHandler(object sender, JobCompletedEventArgs e)
        {
            Console.WriteLine("Job " + e.Job.Name + " is finished");
        }
    }

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

STK Parallel Computing Server 2.9 API for .NET