Exemple #1
0
 public virtual void IsLessImportantThan(Task otherTask)
 {
     AddLink(otherTask, LinkType.LessImportantThan);
     otherTask.AddLink(this, LinkType.MoreImportantThan);
 }
Exemple #2
0
 public virtual void IsMoreImportantThan(Task otherTask)
 {
     if (!CanBeMoreImportantThan(otherTask))
     {
         throw new InvalidOperationException(String.Format("Cannot make {0} more important than {1}", this, otherTask));
     }
     AddLink(otherTask, LinkType.MoreImportantThan);
     otherTask.AddLink(this, LinkType.LessImportantThan);
 }
Exemple #3
0
        public virtual Task CreateSubTask()
        {
            var subTask = new Task();
            AddLink(subTask, LinkType.Child);
            subTask.AddLink(this, LinkType.Parent);

            return subTask;
        }