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 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); } }
public void ChangeProductOwner(ProductOwner productOwner) { if (!this.ProductOwnerId.Equals(productOwner.ProductOwnerId)) { this.ProductOwnerId = productOwner.ProductOwnerId; // TODO: publish event } }
public void AssignProductOwner(ProductOwner productOwner) { this.ProductOwner = productOwner; }