Пример #1
0
 public タスク(
     テナントId tenantId, 
     バックログアイテムId backlogItemId, 
     タスクId taskId, 
     チームメンバ teamMember, 
     string name, 
     string description, 
     int hoursRemaining, 
     タスクステータス 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<見積りログエントリー>();
 }
 public void EnableTeamMember(チームメンバー有効化コマンド command)
 {
     var tenantId = new テナントId(command.TenantId);
     アプリケーションサービスライフサイクル.Begin();
     try
     {
         var teamMember = this.teamMemberRepository.Get(tenantId, command.Username);
         if (teamMember != null)
         {
             teamMember.Enable(command.OccurredOn);
         }
         else
         {
             teamMember = new チームメンバ(tenantId, command.Username, command.FirstName, command.LastName, command.EmailAddress, command.OccurredOn);
             this.teamMemberRepository.Save(teamMember);
         }
         アプリケーションサービスライフサイクル.Success();
     }
     catch (Exception ex)
     {
         アプリケーションサービスライフサイクル.Fail(ex);
     }
 }
        public void DefineTask(チームメンバ volunteer, string name, string description, int hoursRemaining)
        {
            var task = new タスク(
                this.TenantId,
                this.BacklogItemId,
                new タスクId(),
                volunteer,
                name,
                description,
                hoursRemaining,
                タスクステータス.NotStarted);

            this.tasks.Add(task);

            DomainEventPublisher.Instance.Publish(
                new タスク定義時(this.TenantId, this.BacklogItemId, task.TaskId, volunteer.TeamMemberId.Id, name, description));
        }
 public void AssignTaskVolunteer(タスクId taskId, チームメンバ volunteer)
 {
     var task = LoadTask(taskId);
     task.AssignVolunteer(volunteer);
 }
Пример #5
0
 public void RemoveTeamMember(チームメンバ teamMember)
 {
     AssertValidTeamMember(teamMember);
     var existingTeamMember = GetTeamMemberByUserName(teamMember.Username);
     if (existingTeamMember != null)
     {
         this.teamMembers.Remove(existingTeamMember);
     }
 }
Пример #6
0
 public bool IsTeamMember(チームメンバ teamMember)
 {
     AssertValidTeamMember(teamMember);
     return GetTeamMemberByUserName(teamMember.Username) != null;
 }
Пример #7
0
 public void AssignTeamMember(チームメンバ teamMember)
 {
     AssertValidTeamMember(teamMember);
     this.teamMembers.Add(teamMember);
 }
Пример #8
0
 void AssertValidTeamMember(チームメンバ teamMember)
 {
     AssertionConcern.AssertArgumentNotNull(teamMember, "A team member must be provided.");
     AssertionConcern.AssertArgumentEquals(this.TenantId, teamMember.TenantId, "Team member must be of the same tenant.");
 }
Пример #9
0
 internal void AssignVolunteer(チームメンバ teamMember)
 {
     AssertionConcern.AssertArgumentNotNull(teamMember, "A volunteer must be provided.");
     this.Volunteer = teamMember.TeamMemberId;
     DomainEventPublisher.Instance.Publish(
         new タスクボランティアアサイン時(this.TenantId, this.BacklogItemId, this.TaskId, teamMember.TeamMemberId.Id));
 }