Example #1
0
        public ReportInstanceTask AddTask(string source, string description, TaskType taskType)
        {
            var taskDetail = new TaskDetail(source, description);
            var taskStatus = TaskStatus.New;

            var newTask = new ReportInstanceTask(taskDetail, taskType, taskStatus);

            _tasks.Add(newTask);

            AddTaskAddedDomainEvent(newTask);

            return(newTask);
        }
Example #2
0
        private void AddTaskAttendedToDomainEvent(ReportInstanceTask cancelledTask)
        {
            var domainEvent = new TaskAttendedToDomainEvent(cancelledTask);

            this.AddDomainEvent(domainEvent);
        }
Example #3
0
        private void AddTaskAddedDomainEvent(ReportInstanceTask newTask)
        {
            var domainEvent = new TaskAddedDomainEvent(newTask);

            this.AddDomainEvent(domainEvent);
        }