Share via


IJob.GetEnumerator Method

Retrieves an enumerator used to enumerate the tasks in the job.

Namespace: Microsoft.ComputeCluster
Assembly: CcpAPI (in ccpapi.dll)

Usage

Syntax

'Declaration
Function GetEnumerator As IEnumerator
IEnumerator GetEnumerator ()
IEnumerator^ GetEnumerator ()
IEnumerator GetEnumerator ()
function GetEnumerator () : IEnumerator

Return Value

An IEnumerator interface used to enumerate the tasks in the job. The items of the enumeration are ITask interfaces.

Example

            foreach (IJob job in cluster.ListAllJobs())
            {
                Console.WriteLine(job.Name);

                foreach (ITask task in job)
                {
                    if (string.IsNullOrEmpty(task.Name))
                        Console.WriteLine("\t" + task.Id);
                    else
                        Console.WriteLine("\t" + task.Id);
                }

                Console.WriteLine();
            }

Remarks

You do not use this method directly. Instead you use the job object as shown in the example.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Microsoft Windows Compute Cluster Server 2003, Windows Server 2003, Windows XP

Target Platforms

Microsoft Windows Compute Cluster Server 2003, Windows Server 2003 with Compute Cluster Pack Client Utilities, Windows XP with Compute Cluster Pack Client Utilities

See Also

Reference

IJob Interface
IJob Members
Microsoft.ComputeCluster Namespace
ICluster.ListTasks Method
GetTask