ScheduledTask
One task as scheduled: the dates the links allow, how much it can slip, whether it is critical, and where it sits in the outline.
public sealed class ScheduledTask
Remarks
Dates and indexes
Start, Finish, LateStartDate and
LateFinishDate are calendar dates, and inclusive: the first and last working days of
the task. The Early and Late values are the same thing as positions in the count of
working days of ProjectSchedule.Calendar (index 0 is its
Origin). On that count a task occupies
[EarlyStart, EarlyFinish): EarlyFinish is the first index after the
task, which is exactly where a finish-to-start successor begins. Use the indexes for arithmetic and
the dates for display.
Float and the critical path
TotalFloat is how many working days the task can slip before the project's
finish moves; FreeFloat how many before any task after it moves. A task with no total
float is IsCritical: any delay to it delays the whole plan.
A ScheduledTask is a snapshot, made afresh each time the plan is scheduled.
Change the plan through Task, the ProjectTask it came from.
Examples
foreach (ScheduledTask task in schedule.Tasks)
{
string indent = new string(' ', task.Depth * 2);
Console.WriteLine("{0}{1} {2}: {3:d} to {4:d}, {5} days, float {6}{7}",
indent, task.Wbs, task.Name, task.Start, task.Finish, task.Duration,
task.TotalFloat, task.IsCritical ? " (critical)" : "");
}See also
Members at a glance
| Properties | |
|---|---|
Assignee | Gets the task's ProjectTask.Assignee. |
BaselineFinish | Gets the task's ProjectTask.BaselineFinish: the originally agreed last day, or
null. |
BaselineStart | Gets the task's ProjectTask.BaselineStart: the originally agreed start, or
null. |
Category | Gets the task's ProjectTask.Category. |
Children | Gets the ids of the tasks directly under this one. |
Depth | Gets how deep the task sits in the outline. |
Duration | Gets the task's length in working days. |
EarlyFinish | Gets the earliest the task can finish, as a working-day index. |
EarlyStart | Gets the earliest the task can start, as a working-day index. |
Finish | Gets the last working day the task is scheduled on. |
FreeFloat | Gets how many working days the task can slip without moving any task that follows it. |
Id | Gets the task's ProjectTask.Id. |
IsCollapsed | Gets whether a summary asked to start with its subtasks hidden
(ProjectTask.IsCollapsed). Always false for a task that is not a
summary. |
IsCritical | Gets whether the task is on the critical path: it has no float, so any delay to it delays the whole plan. |
IsMilestone | Gets whether the task is a milestone: no length, drawn as a diamond. |
IsSummary | Gets whether the task has subtasks, so that its dates, length and progress are rolled up from theirs. |
LateFinish | Gets the latest the task can finish without moving the project's finish, as a working-day index. |
LateFinishDate | Gets the latest last day the task can have without moving the project's finish. |
LateStart | Gets the latest the task can start without moving the project's finish, as a working-day index. |
LateStartDate | Gets the latest first day the task can have without moving the project's finish. |
Name | Gets the task's ProjectTask.Name, or its id when the name is
null. |
ParentId | Gets the id of the summary the task sits under. |
Progress | Gets how much of the task is done, as a percentage. |
Start | Gets the first working day the task is scheduled on. |
Status | Gets the task's ProjectTask.Status. |
Task | Gets the task this was scheduled from: the application's own object. |
TotalFloat | Gets how many working days the task can slip without moving the project's finish. |
Wbs | Gets the task's outline number, as the Gantt chart's first column and its Predecessors cells write it. |
| Methods | |
ToString | Returns the task's name, for the debugger. |
Properties
BaselineFinish
Gets the task's ProjectTask.BaselineFinish: the originally agreed last day, or
null.
BaselineStart
Gets the task's ProjectTask.BaselineStart: the originally agreed start, or
null.
Children
Gets the ids of the tasks directly under this one.
- Value
- The subtasks' ids in plan order; empty for a task that is not a summary. Never
null.
Depth
Gets how deep the task sits in the outline.
- Value
- 0 for a top-level task, 1 for its subtasks, and so on.
Duration
Gets the task's length in working days.
- Value
- For work, its own duration; 0 for a milestone; for a summary, the working days from its earliest subtask's start to its latest subtask's finish.
EarlyFinish
Gets the earliest the task can finish, as a working-day index.
EarlyStart
Gets the earliest the task can start, as a working-day index.
- Value
- The index of the task's first day on
ProjectSchedule.Calendar; the date isStart.
Finish
Gets the last working day the task is scheduled on.
- Value
- A date with no time of day, inclusive. For a milestone, the same as
Start: the day it falls on, which for a milestone that follows a finish is that finishing day.
FreeFloat
Gets how many working days the task can slip without moving any task that follows it.
- Value
- Never negative. For a task with no successors – including the links out of the summaries it
sits in – the room left before the project's finish. For a summary, the same as
TotalFloat.
IsCollapsed
Gets whether a summary asked to start with its subtasks hidden
(ProjectTask.IsCollapsed). Always false for a task that is not a
summary.
IsCritical
Gets whether the task is on the critical path: it has no float, so any delay to it delays the whole plan.
- Value
- For work and milestones,
truewhenTotalFloatis zero or less. A summary is critical when any task inside it is.
IsMilestone
Gets whether the task is a milestone: no length, drawn as a diamond.
- Value
truefor a task with a duration of zero or withProjectTask.IsMilestoneset; alwaysfalsefor a summary.
IsSummary
Gets whether the task has subtasks, so that its dates, length and progress are rolled up from theirs.
LateFinish
Gets the latest the task can finish without moving the project's finish, as a working-day index.
- Value
- The index just after the latest last day; the date is
LateFinishDate.
LateFinishDate
Gets the latest last day the task can have without moving the project's finish.
LateStart
Gets the latest the task can start without moving the project's finish, as a working-day index.
- Value
- The date is
LateStartDate.
LateStartDate
Gets the latest first day the task can have without moving the project's finish.
ParentId
Gets the id of the summary the task sits under.
- Value
- The parent's id, or
nullfor a top-level task – including one whoseProjectTask.ParentIdwas refused as unknown or circular.
Progress
Gets how much of the task is done, as a percentage.
- Value
- From 0 to 100. For work, the task's
ProjectTask.Progressbrought into that range; for a summary, the progress of the work inside it weighted by duration, to one decimal place.
Start
Gets the first working day the task is scheduled on.
- Value
- A date with no time of day. For a milestone, the day it falls on.
Task
Gets the task this was scheduled from: the application's own object.
TotalFloat
Gets how many working days the task can slip without moving the project's finish.
- Value
LateStart - EarlyStart. Zero on the critical path; negative when a date the task must start on already makes the plan late. For a summary, the least float of any work inside it.
Wbs
Gets the task's outline number, as the Gantt chart's first column and its Predecessors cells write it.
- Value
- Text such as
1,1.2or1.2.3, numbered in plan order from 1 at each level.
Methods
ToString
Returns the task's name, for the debugger.
Returns
The Name.