public override bool Equals(object obj) { if ((obj as TaskProgressState) != null) { TaskProgressState other = obj as TaskProgressState; return(id.Equals(other.id)); } else { throw new System.Exception("It tried comparison with different format"); } }
// initialize with existing task instance and its progressState public TaskState(Task _task) { task = _task; progressState = _task.state; }
public TaskState(Task _task, TaskProgressState _progressState) { task = _task; progressState = _progressState; }