TaskUtils Class

Helper class which provides useful operations with tasks.
Inheritance Hierarchy

Namespace:  Aspose.Tasks.Util
Assembly:  Aspose.Tasks (in Aspose.Tasks.dll) Version: 20.10
public static class TaskUtils

The TaskUtils type exposes the following members.

Public methodStatic memberCode exampleApply
Applies specified algorithm to each task of a tree.
Public methodStatic memberCode exampleFilter
Builds new tree of tasks which satisfy the condition.
Public methodStatic memberCode exampleFind
Finds a task which satisfy the condition in a tree of tasks.
Public methodStatic memberCode exampleTaskChildrenCount
Recursively calculates a number of task's children tasks through all levels.
Shows how to work with a tree algorithm.
var project = new Project(DataDir + "Project2.mpp");

// gather all project tasks
var coll = new ChildTasksCollector();
TaskUtils.Apply(project.RootTask, coll, 0);

// work with tasks as with a plain list
foreach (var task in coll.Tasks)
    Console.WriteLine("Task Name: " + task.Get(Tsk.Name));
See Also