public TaskVolunteerAssigned(Tenants.TenantId tenantId, BacklogItemId backlogItemId, TaskId taskId, string volunteerMemberId)
 {
     this.TenantId = tenantId;
     this.BacklogItemId = backlogItemId;
     this.TaskId = taskId;
     this.VolunteerMemberId = volunteerMemberId;
 }
Exemplo n.º 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;
 }
Exemplo n.º 3
0
 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;
 }
Exemplo n.º 5
0
 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;
        }
Exemplo n.º 7
0
        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;
        }
Exemplo n.º 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>();
 }
Exemplo n.º 9
0
        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));
        }
Exemplo n.º 10
0
 public Task GetTask(TaskId taskId)
 {
     return this.tasks.FirstOrDefault(x => x.TaskId.Equals(taskId));
 }
Exemplo n.º 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));
            }
        }
Exemplo n.º 12
0
 public void DescribeTask(TaskId taskId, string description)
 {
     var task = LoadTask(taskId);
     task.DescribeAs(description);
 }
Exemplo n.º 13
0
 public void ChangeTaskStatus(TaskId taskId, TaskStatus status)
 {
     var task = LoadTask(taskId);
     task.ChangeStatus(status);
 }
Exemplo n.º 14
0
 public void AssignTaskVolunteer(TaskId taskId, TeamMember volunteer)
 {
     var task = LoadTask(taskId);
     task.AssignVolunteer(volunteer);
 }
Exemplo n.º 15
0
 public Task GetTask(TaskId taskId)
 {
     return(this.tasks.FirstOrDefault(x => x.TaskId.Equals(taskId)));
 }
Exemplo n.º 16
0
        public void AssignTaskVolunteer(TaskId taskId, TeamMember volunteer)
        {
            var task = LoadTask(taskId);

            task.AssignVolunteer(volunteer);
        }
Exemplo n.º 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;
 }
Exemplo n.º 19
0
 public void RenameTask(TaskId taskId, string name)
 {
     var task = LoadTask(taskId);
     task.Rename(name);
 }
Exemplo n.º 20
0
        public void DescribeTask(TaskId taskId, string description)
        {
            var task = LoadTask(taskId);

            task.DescribeAs(description);
        }
Exemplo n.º 21
0
        public void RenameTask(TaskId taskId, string name)
        {
            var task = LoadTask(taskId);

            task.Rename(name);
        }
Exemplo n.º 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;
 }
Exemplo n.º 23
0
 Task LoadTask(TaskId taskId)
 {
     var task = GetTask(taskId);
     if (task == null)
         throw new InvalidOperationException("Task does not exist.");
     return task;
 }
Exemplo n.º 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;
 }