public TaskVolunteerAssigned(Tenants.TenantId tenantId, BacklogItemId backlogItemId, TaskId taskId, string volunteerMemberId)
 {
     this.TenantId = tenantId;
     this.BacklogItemId = backlogItemId;
     this.TaskId = taskId;
     this.VolunteerMemberId = volunteerMemberId;
 }
示例#2
0
 public TaskDescribed(Tenants.TenantId tenantId, BacklogItemId backlogItemId, TaskId taskId, string description)
 {
     this.TenantId = tenantId;
     this.BacklogItemId = backlogItemId;
     this.TaskId = taskId;
     this.Description = description;
 }
 public TaskStatusChanged(Tenants.TenantId tenantId, BacklogItemId backlogItemId, TaskId taskId, TaskStatus status)
 {
     this.TenantId = tenantId;
     this.BacklogItemId = backlogItemId;
     this.TaskId = taskId;
     this.Status = status;
 }
 public TaskHoursRemainingEstimated(Tenants.TenantId tenantId, BacklogItemId backlogItemId, TaskId taskId, int hoursRemaining)
 {
     this.TenantId = tenantId;
     this.BacklogItemId = backlogItemId;
     this.TaskId = taskId;
     this.HoursRemaining = hoursRemaining;
 }
 public TaskRenamed(Tenants.TenantId tenantId, BacklogItemId backlogItemId, TaskId taskId, string name)
 {
     this.TenantId = tenantId;
     this.BacklogItemId = backlogItemId;
     this.TaskId = taskId;
     this.Name = name;
 }
        public EstimationLogEntry(Tenants.TenantId tenantId, TaskId taskId, DateTime date, int hoursRemaining)
        {
            AssertionConcern.AssertArgumentNotNull(tenantId, "The tenant id must be provided.");
            AssertionConcern.AssertArgumentNotNull(taskId, "The task id must be provided.");

            this.TenantId = tenantId;
            this.TaskId = taskId;
            this.Date = date.Date;
            this.HoursRemaining = hoursRemaining;
        }
        public TaskDefined(Tenants.TenantId tenantId, BacklogItemId backlogItemId, TaskId taskId, string volunteerMemberId, string name, string description)
        {
            this.TenantId = tenantId;
            this.EventVersion = 1;
            this.OccurredOn = DateTime.UtcNow;
            this.BacklogItemId = backlogItemId;

            this.TaskId = taskId;
            this.VolunteerMemberId = volunteerMemberId;
            this.Name = name;
            this.Description = description;
        }
示例#8
0
 public Task(
     TenantId tenantId, 
     BacklogItemId backlogItemId, 
     TaskId taskId, 
     TeamMember teamMember, 
     string name, 
     string description, 
     int hoursRemaining, 
     TaskStatus status)
 {
     this.TenantId = tenantId;
     this.BacklogItemId = backlogItemId;
     this.TaskId = taskId;
     this.Volunteer = teamMember.TeamMemberId;
     this.Name = name;
     this.Description = description;
     this.HoursRemaining = hoursRemaining;
     this.Status = status;
     this.estimationLog = new List<EstimationLogEntry>();
 }
        public void RemoveTask(TaskId taskId)
        {
            var task = LoadTask(taskId);

            if (!this.tasks.Remove(task))
                throw new InvalidOperationException("Task was not removed.");

            DomainEventPublisher.Instance.Publish(
                new TaskRemoved(this.TenantId, this.BacklogItemId));
        }
示例#10
0
 public Task GetTask(TaskId taskId)
 {
     return this.tasks.FirstOrDefault(x => x.TaskId.Equals(taskId));
 }
示例#11
0
        public void EstimateTaskHoursRemaining(TaskId taskId, int hoursRemaining)
        {
            var task = LoadTask(taskId);
            task.EstimateHoursRemaining(hoursRemaining);

            var changedStatus = default(BacklogItemStatus?);

            if (hoursRemaining == 0)
            {
                if (!this.AnyTaskHoursRemaining)
                {
                    changedStatus = BacklogItemStatus.Done;
                }
            }
            else if (this.IsDone)
            {
                if (this.IsCommittedToSprint)
                {
                    changedStatus = BacklogItemStatus.Committed;
                }
                else if (this.IsScheduledForRelease)
                {
                    changedStatus = BacklogItemStatus.Scheduled;
                }
                else
                {
                    changedStatus = BacklogItemStatus.Planned;
                }
            }

            if (changedStatus != null)
            {
                this.Status = changedStatus.Value;
                DomainEventPublisher.Instance.Publish(
                    new BacklogItemStatusChanged(this.TenantId, this.BacklogItemId, changedStatus.Value));
            }
        }
示例#12
0
 public void DescribeTask(TaskId taskId, string description)
 {
     var task = LoadTask(taskId);
     task.DescribeAs(description);
 }
示例#13
0
 public void ChangeTaskStatus(TaskId taskId, TaskStatus status)
 {
     var task = LoadTask(taskId);
     task.ChangeStatus(status);
 }
示例#14
0
 public void AssignTaskVolunteer(TaskId taskId, TeamMember volunteer)
 {
     var task = LoadTask(taskId);
     task.AssignVolunteer(volunteer);
 }
示例#15
0
 public Task GetTask(TaskId taskId)
 {
     return(this.tasks.FirstOrDefault(x => x.TaskId.Equals(taskId)));
 }
示例#16
0
        public void AssignTaskVolunteer(TaskId taskId, TeamMember volunteer)
        {
            var task = LoadTask(taskId);

            task.AssignVolunteer(volunteer);
        }
示例#17
0
        public void ChangeTaskStatus(TaskId taskId, TaskStatus status)
        {
            var task = LoadTask(taskId);

            task.ChangeStatus(status);
        }
 public TaskVolunteerAssigned(Tenants.TenantId tenantId, BacklogItemId backlogItemId, TaskId taskId, string volunteerMemberId)
 {
     this.TenantId = tenantId;
     this.BacklogItemId = backlogItemId;
     this.TaskId = taskId;
     this.VolunteerMemberId = volunteerMemberId;
 }
示例#19
0
 public void RenameTask(TaskId taskId, string name)
 {
     var task = LoadTask(taskId);
     task.Rename(name);
 }
示例#20
0
        public void DescribeTask(TaskId taskId, string description)
        {
            var task = LoadTask(taskId);

            task.DescribeAs(description);
        }
示例#21
0
        public void RenameTask(TaskId taskId, string name)
        {
            var task = LoadTask(taskId);

            task.Rename(name);
        }
示例#22
0
 public TaskStatusChanged(Tenants.TenantId tenantId, BacklogItemId backlogItemId, TaskId taskId, TaskStatus status)
 {
     this.TenantId      = tenantId;
     this.BacklogItemId = backlogItemId;
     this.TaskId        = taskId;
     this.Status        = status;
 }
示例#23
0
 Task LoadTask(TaskId taskId)
 {
     var task = GetTask(taskId);
     if (task == null)
         throw new InvalidOperationException("Task does not exist.");
     return task;
 }
示例#24
0
 public TaskHoursRemainingEstimated(Tenants.TenantId tenantId, BacklogItemId backlogItemId, TaskId taskId, int hoursRemaining)
 {
     this.TenantId       = tenantId;
     this.BacklogItemId  = backlogItemId;
     this.TaskId         = taskId;
     this.HoursRemaining = hoursRemaining;
 }