Example #1
0
File: Task.cs Project: ArildF/PTB
 public virtual void IsLessImportantThan(Task otherTask)
 {
     AddLink(otherTask, LinkType.LessImportantThan);
     otherTask.AddLink(this, LinkType.MoreImportantThan);
 }
Example #2
0
File: Task.cs Project: ArildF/PTB
 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);
 }
Example #3
0
File: Task.cs Project: ArildF/PTB
        public virtual Task CreateSubTask()
        {
            var subTask = new Task();
            AddLink(subTask, LinkType.Child);
            subTask.AddLink(this, LinkType.Parent);

            return subTask;
        }