public チーム(テナントId tenantId, string name, プロダクトオーナ 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<チームメンバ>(); }
public void EnableProductOwner(プロダクトオーナー有効化コマンド command) { var tenantId = new テナントId(command.TenantId); アプリケーションサービスライフサイクル.Begin(); try { var productOwner = this.productOwnerRepository.Get(tenantId, command.Username); if (productOwner != null) { productOwner.Enable(command.OccurredOn); } else { productOwner = new プロダクトオーナ(tenantId, command.Username, command.FirstName, command.LastName, command.EmailAddress, command.OccurredOn); this.productOwnerRepository.Save(productOwner); } アプリケーションサービスライフサイクル.Success(); } catch (Exception ex) { アプリケーションサービスライフサイクル.Fail(ex); } }
public void AssignProductOwner(プロダクトオーナ productOwner) { this.ProductOwner = productOwner; }