I have an object
public class Task
{
public TimeSpan Length { get; set; }
public IList<Task> Dependencies { get; set; }
public DateTime? StartDate { get; set; }
}
which has dependencies on other instances. For example:
(read "<-" as "depends on")
- B <- A
- C <- A
- D <- B,C
and
- Q <- P
- R <- Q
Given a list of Tasks* and an EndDate, I need to set the StartDate on each task such that they will all be completed by the EndDate. Tasks may run in parallel where possible, so....
A has to be completed before B and C (which can be done at the same time), and D can only be run after B and C are both complete.
R must run after Q, after P, but these can be run in parelell to A B C and D.
* the list will be complete, all dependencies will be present in the list
Thanks for any advice Andrew