public Plan(PlanId id, string name, string description, string owner, PlanType typeOfPlan) : this(id) { if (typeOfPlan == PlanType.Personal) { AcceptChange(new PersonalPlanCreated(id, name, description, owner)); } else if (typeOfPlan == PlanType.Distributable) { AcceptChange(new DistributablePlanCreated(id, name, description, owner)); } else if (typeOfPlan == PlanType.Collaborative) { AcceptChange(new CollaborativePlanCreated(id, name, description, owner)); } this.AssignOwnership(owner); }
public Task(TaskId id, PlanId planId, string title, Reccurence taskType) : base(id) { AcceptChange(new TaskCreated(id, planId, title, taskType)); }