/// <summary> /// Initializes a new instance of the <see cref="Project" /> class. /// Using UNMUTABLE pattern principles. /// </summary> /// <param name="id">The identifier.</param> /// <param name="name">The name.</param> /// <param name="imagen">The picture.</param> /// <param name="summary">The summary.</param> /// <param name="priority">The priority.</param> /// <param name="pomodores">The timers.</param> public Project(int id, string name, string imagen, string summary, ProjColor priority, int pomodores) { this.id = id; this.name = name; this.imagen = imagen; this.summary = summary; this.priority = priority; this.pomodores = pomodores; }
/// <summary> /// Sets the priority. /// </summary> /// <param name="newPriority">The new priority.</param> /// <returns>New Cloned Project with updated Priority.</returns> public Project SetPriority(ProjColor newPriority) { return(new Project(this.id, this.Name, this.imagen, this.summary, newPriority, this.pomodores)); }