Class ChildTasksCollector
Contents
[
Hide
]ChildTasksCollector class
Collects all child tasks.
public class ChildTasksCollector : TreeAlgorithmBase<Task>
Constructors
| Name | Description |
|---|---|
| ChildTasksCollector() | Initializes a new instance of the ChildTasksCollector class. |
Properties
| Name | Description |
|---|---|
| Tasks { get; } | Gets a list collected child objects (tasks). |
Methods
| Name | Description |
|---|---|
| override Alg(Task, int) | Processes the specified object. |
| virtual PostAlg(Task, int) | |
| virtual PreAlg(Task, int) |
Examples
Shows how to iterate over all tasks in a project as a plain list.
var project = new Project(DataDir + "ParentChildTasks.mpp");
var collector = new ChildTasksCollector();
TaskUtils.Apply(project.RootTask, collector, 0);
// Parse through all the collected tasks
foreach (var task in collector.Tasks)
{
Console.WriteLine(task.Get(Tsk.Name));
}
See Also
- class TreeAlgorithmBase<T>
- class Task
- namespace Aspose.Tasks.Util
- assembly Aspose.Tasks