public virtual void IsLessImportantThan(Task otherTask) { AddLink(otherTask, LinkType.LessImportantThan); otherTask.AddLink(this, LinkType.MoreImportantThan); }
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); }
public virtual Task CreateSubTask() { var subTask = new Task(); AddLink(subTask, LinkType.Child); subTask.AddLink(this, LinkType.Parent); return subTask; }