コード例 #1
0
 public CommittedBacklogItem(TenantId tenantId, SprintId sprintId, BacklogItemId backlogItemId, int ordering = 0)
 {
     this.TenantId = tenantId;
     this.SprintId = sprintId;
     this.BacklogItemId = backlogItemId;
     this.Ordering = ordering;
 }
コード例 #2
0
        public BacklogItemCommitted(TenantId tenantId, BacklogItemId backlogItemId, SprintId sprintId)
        {
            this.TenantId = tenantId;
            this.BacklogItemId = backlogItemId;
            this.SprintId = sprintId;

            this.EventVersion = 1;
            this.OccurredOn = DateTime.Now;
        }
コード例 #3
0
        public ProductSprintScheduled(TenantId tenantId, ProductId productId, SprintId sprintId, string name,
            string goals, DateTime starts, DateTime ends)
        {
            this.TenantId = tenantId;
            this.ProductId = productId;
            this.SprintId = sprintId;
            this.Name = name;
            this.Goals = goals;
            this.Starts = starts;
            this.Ends = ends;

            this.EventVersion = 1;
            this.OccurredOn = DateTime.Now;
        }
コード例 #4
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.TenantId = tenantId;
            this.ProductId = productId;
            this.SprintId = sprintId;
            this.Name = name;
            this.Goals = goals;
            this.Begins = begins;
            this.Ends = ends;

            _backlogItems = new HashSet<CommittedBacklogItem>();
        }
コード例 #5
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;
        }