コード例 #1
0
        public Sprint ScheduleSprint(
            SprintId newSprintId,
            String name,
            String goals,
            DateTime begins,
            DateTime ends)
        {
            Sprint sprint =
                new Sprint(
                    this.TenantId,
                    this.ProductId,
                    newSprintId,
                    name,
                    goals,
                    begins,
                    ends);

            DomainEventPublisher
            .Instance
            .Publish(new ProductSprintScheduled(
                         sprint.TenantId,
                         sprint.ProductId,
                         sprint.SprintId,
                         sprint.Name,
                         sprint.Goals,
                         sprint.Begins,
                         sprint.Ends));

            return(sprint);
        }
コード例 #2
0
ファイル: SprintTeamMember.cs プロジェクト: chull434/CSAA
 public ServiceModels.SprintTeamMember Map()
 {
     return(new ServiceModels.SprintTeamMember
     {
         SprintId = SprintId.ToString(),
         ProjectTeamMemberId = ProjectTeamMemberId.ToString(),
         UserId = ProjectTeamMember.UserId
     });
 }
コード例 #3
0
        protected override void ValidateCore()
        {
            if (SprintId.IsBlankIdentity())
            {
                AddError("", "Idenitity is invalid.");
            }

            if (TaskId.IsBlankIdentity())
            {
                AddError("", "Idenitity is invalid.");
            }
        }
コード例 #4
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = ProjectGroupId.GetHashCode();
         hashCode = (hashCode * 397) ^ ProjectId.GetHashCode();
         hashCode = (hashCode * 397) ^ SprintId.GetHashCode();
         hashCode = (hashCode * 397) ^ ActivityId.GetHashCode();
         hashCode = (hashCode * 397) ^ AssigneeId.GetHashCode();
         hashCode = (hashCode * 397) ^ LoggedTimeId.GetHashCode();
         return(hashCode);
     }
 }
コード例 #5
0
 public bool Equals(ProjectGroupLogsDto other)
 {
     if (ReferenceEquals(null, other))
     {
         return(false);
     }
     if (ReferenceEquals(this, other))
     {
         return(true);
     }
     return(ProjectGroupId.Equals(other.ProjectGroupId) && ProjectId.Equals(other.ProjectId) &&
            SprintId.Equals(other.SprintId) && ActivityId.Equals(other.ActivityId) &&
            AssigneeId.Equals(other.AssigneeId) && LoggedTimeId.Equals(other.LoggedTimeId));
 }
コード例 #6
0
 public ProductSprintScheduled(
     TenantId tenantId,
     ProductId productId,
     SprintId sprintId,
     string name,
     string goals,
     DateTime starts,
     DateTime ends)
 {
     Ends         = ends;
     EventVersion = 1;
     Goals        = goals;
     Name         = name;
     OccurredOn   = DateTime.Now;
     ProductId    = productId;
     SprintId     = sprintId;
     Starts       = starts;
     TenantId     = tenantId;
 }
コード例 #7
0
 public ProductSprintScheduled(
     TenantId tenantId,
     ProductId productId,
     SprintId sprintId,
     string name,
     string goals,
     DateTime starts,
     DateTime ends)
 {
     this.Ends         = ends;
     this.EventVersion = 1;
     this.Goals        = goals;
     this.Name         = name;
     this.OccurredOn   = DateTime.Now;
     this.ProductId    = productId;
     this.SprintId     = sprintId;
     this.Starts       = starts;
     this.TenantId     = tenantId;
 }
コード例 #8
0
 public ProductSprintScheduled(
     TenantId tenantId,
     ProductId productId,
     SprintId sprintId,
     string name,
     string goals,
     DateTime starts,
     DateTime ends)
 {
     this.Ends = ends;
     this.EventVersion = 1;
     this.Goals = goals;
     this.Name = name;
     this.OccurredOn = DateTime.Now;
     this.ProductId = productId;
     this.SprintId = sprintId;
     this.Starts = starts;
     this.TenantId = tenantId;
 }
コード例 #9
0
ファイル: UserStory.cs プロジェクト: chull434/CSAA
        public ServiceModels.UserStory Map()
        {
            var userStory = new ServiceModels.UserStory(Title, Description, ProjectId.ToString())
            {
                UserStoryAcceptanceTests = UserStoryAcceptanceTests.Select(m => m.Map()).ToList(),
                UserStoryTasks           = UserStoryTasks.Select(m => m.Map()).ToList(),
                Id          = Id.ToString(),
                StoryPoints = StoryPoints,
                Priority    = Priority,
                MarketValue = MarketValue
            };

            if (SprintId != null)
            {
                userStory.SprintId    = SprintId.ToString();
                userStory.SprintTitle = Sprint.Title;
            }
            return(userStory);
        }
コード例 #10
0
        public Sprint(
            TenantId tenantId,
            ProductId productId,
            SprintId sprintId,
            string name,
            string goals,
            DateTime begins,
            DateTime ends)
        {
            if (ends.Ticks < begins.Ticks)
            {
                throw new InvalidOperationException("Sprint must not end before it begins.");
            }

            this.BacklogItems = new HashSet<CommittedBacklogItem>();
            this.Begins = begins;
            this.Goals = goals;
            this.Ends = ends;
            this.Name = name;
            this.ProductId = productId;
            this.SprintId = sprintId;
            this.TenantId = tenantId;
        }
コード例 #11
0
 protected Event_message Task_is_removed_from_sprint(SprintId sprintId, TaskId taskId)
 {
     return(new Event_message(sprintId.Value, new Task_is_removed_from_sprint(sprintId, taskId)));
 }
コード例 #12
0
 protected Event_message Task_is_committed_to_sprint(SprintId sprintId, TaskId taskId)
 {
     return(new Event_message(sprintId.Value, new Task_is_committed_to_sprint(sprintId, taskId)));
 }
コード例 #13
0
 protected Remove_task_from_sprint Remove_task_from_sprint(SprintId sprintId, TaskId taskId)
 {
     return(new Remove_task_from_sprint(sprintId, taskId));
 }
コード例 #14
0
 protected Start_sprint Start_sprint(SprintId sprintId)
 {
     return(new Start_sprint(sprintId));
 }
コード例 #15
0
 public Sprint_is_started(SprintId sprintId)
 {
     SprintId = sprintId;
 }
コード例 #16
0
 public Sprint_could_not_start(SprintId sprintId, Reason reason)
 {
     SprintId = sprintId;
     Reason   = reason;
 }
コード例 #17
0
 protected Event_message Sprint_is_closed(SprintId sprintId)
 {
     return(new Event_message(sprintId.Value, new Sprint_is_closed(sprintId)));
 }
コード例 #18
0
 public Task_is_removed_from_sprint(SprintId sprintId, TaskId taskId)
 {
     SprintId = sprintId;
     TaskId   = taskId;
 }
コード例 #19
0
 public Remove_task_from_sprint(SprintId sprintId, TaskId taskId)
 {
     SprintId = sprintId;
     TaskId   = taskId;
 }
コード例 #20
0
 public Sprint_is_closed(SprintId sprintId)
 {
     SprintId = sprintId;
 }
コード例 #21
0
 public Task_is_committed_to_sprint(SprintId sprintId, TaskId taskId)
 {
     SprintId = sprintId;
     TaskId   = taskId;
 }
コード例 #22
0
 public Sprint_is_planned(ProjectId projectId, SprintId sprintId)
 {
     ProjectId = projectId;
     SprintId  = sprintId;
 }
コード例 #23
0
 protected Event_message Sprint_is_planned(ProjectId projectId, SprintId sprintId)
 {
     return(new Event_message(sprintId.Value, new Sprint_is_planned(projectId, sprintId)));
 }
コード例 #24
0
 protected Event_message Sprint_could_not_start(SprintId sprintId, Reason reason)
 {
     return(new Event_message(sprintId.Value, new Sprint_could_not_start(sprintId, reason)));
 }
コード例 #25
0
        public Sprint ScheduleSprint(
                SprintId newSprintId,
                String name,
                String goals,
                DateTime begins,
                DateTime ends)
        {
            Sprint sprint =
                new Sprint(
                        this.TenantId,
                        this.ProductId,
                        newSprintId,
                        name,
                        goals,
                        begins,
                        ends);

            DomainEventPublisher
                .Instance
                .Publish(new ProductSprintScheduled(
                        sprint.TenantId,
                        sprint.ProductId,
                        sprint.SprintId,
                        sprint.Name,
                        sprint.Goals,
                        sprint.Begins,
                        sprint.Ends));

            return sprint;
        }
コード例 #26
0
 protected void No_tasks_committed_to_the_sprint(SprintId sprint1)
 {
 }
コード例 #27
0
 public Start_sprint(SprintId sprintId)
 {
     SprintId = sprintId;
 }