Example #1
0
        public Team(TenantId tenantId, string name, ProductOwner productOwner = null)
        {
            AssertionConcern.AssertArgumentNotNull(tenantId, "The tenantId must be provided.");

            this.tenantId = tenantId;
            this.Name = name;
            if (productOwner != null)
                this.ProductOwner = productOwner;
            this.teamMembers = new HashSet<TeamMember>();
        }
Example #2
0
        public Team(TenantId tenantId, string name, ProductOwner productOwner = null)
        {
            AssertionConcern.AssertArgumentNotNull(tenantId, "The tenantId must be provided.");

            this.tenantId = tenantId;
            this.Name     = name;
            if (productOwner != null)
            {
                this.ProductOwner = productOwner;
            }
            this.teamMembers = new HashSet <TeamMember>();
        }
 public void EnableProductOwner(EnableProductOwnerCommand command)
 {
     var tenantId = new TenantId(command.TenantId);
     ApplicationServiceLifeCycle.Begin();
     try
     {
         var productOwner = this.productOwnerRepository.Get(tenantId, command.Username);
         if (productOwner != null)
         {
             productOwner.Enable(command.OccurredOn);
         }
         else
         {
             productOwner = new ProductOwner(tenantId, command.Username, command.FirstName, command.LastName, command.EmailAddress, command.OccurredOn);
             this.productOwnerRepository.Save(productOwner);
         }
         ApplicationServiceLifeCycle.Success();
     }
     catch (Exception ex)
     {
         ApplicationServiceLifeCycle.Fail(ex);
     }
 }
Example #4
0
        public void ChangeProductOwner(ProductOwner productOwner)
        {
            if (!this.ProductOwnerId.Equals(productOwner.ProductOwnerId))
            {
                this.ProductOwnerId = productOwner.ProductOwnerId;

                // TODO: publish event
            }
        }
Example #5
0
 public void AssignProductOwner(ProductOwner productOwner)
 {
     this.ProductOwner = productOwner;
 }
Example #6
0
 public void AssignProductOwner(ProductOwner productOwner)
 {
     this.ProductOwner = productOwner;
 }