public TaskVolunteerAssigned(Tenants.TenantId tenantId, BacklogItemId backlogItemId, TaskId taskId, string volunteerMemberId) { this.TenantId = tenantId; this.BacklogItemId = backlogItemId; this.TaskId = taskId; this.VolunteerMemberId = volunteerMemberId; }
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; }
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)); }
public Task GetTask(TaskId taskId) { return this.tasks.FirstOrDefault(x => x.TaskId.Equals(taskId)); }
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)); } }
public void DescribeTask(TaskId taskId, string description) { var task = LoadTask(taskId); task.DescribeAs(description); }
public void ChangeTaskStatus(TaskId taskId, TaskStatus status) { var task = LoadTask(taskId); task.ChangeStatus(status); }
public void AssignTaskVolunteer(TaskId taskId, TeamMember volunteer) { var task = LoadTask(taskId); task.AssignVolunteer(volunteer); }
public Task GetTask(TaskId taskId) { return(this.tasks.FirstOrDefault(x => x.TaskId.Equals(taskId))); }
public void RenameTask(TaskId taskId, string name) { var task = LoadTask(taskId); task.Rename(name); }
Task LoadTask(TaskId taskId) { var task = GetTask(taskId); if (task == null) throw new InvalidOperationException("Task does not exist."); return task; }