public Product( TenantId tenantId, ProductId productId, ProductOwnerId productOwnerId, string name, string description, DiscussionAvailability discussionAvailability) { this.TenantId = tenantId; // must precede productOwnerId for compare this.Description = description; this.Discussion = ProductDiscussion.FromAvailability(discussionAvailability); this.DiscussionInitiationId = null; this.Name = name; this.ProductId = productId; this.ProductOwnerId = productOwnerId; // TODO: validation currently missing DomainEventPublisher .Instance .Publish(new ProductCreated( this.TenantId, this.ProductId, this.ProductOwnerId, this.Name, this.Description, this.Discussion.Availability)); }
public void ChangeProductOwner(ProductOwner productOwner) { if (!ProductOwnerId.Equals(productOwner.ProductOwnerId)) { ProductOwnerId = productOwner.ProductOwnerId; // TODO: publish event } }
public Product( TenantId tenantId, ProductId productId, ProductOwnerId productOwnerId, string name, string description) { State = new ProductState(); State.ProductKey = tenantId.Id + ":" + productId.Id; State.ProductOwnerId = productOwnerId; State.Name = name; State.Description = description; State.BacklogItems = new List <ProductBacklogItem>(); }
public ProductCreated( TenantId tenantId, ProductId productId, ProductOwnerId productOwnerId, string name, string description, DiscussionAvailability availability) { Availability = availability; Description = description; EventVersion = 1; Name = name; OccurredOn = DateTime.Now; ProductId = productId; ProductOwnerId = productOwnerId; TenantId = tenantId; }
public ProductDiscussionRequested( TenantId tenantId, ProductId productId, ProductOwnerId productOwnerId, string name, string description, bool requestingDiscussion) { this.Description = description; this.EventVersion = 1; this.Name = name; this.OccurredOn = DateTime.Now; this.ProductId = productId; this.ProductOwnerId = productOwnerId; this.RequestingDiscussion = requestingDiscussion; this.TenantId = tenantId; }
public ProductCreated( TenantId tenantId, ProductId productId, ProductOwnerId productOwnerId, string name, string description, DiscussionAvailability availability) { this.Availability = availability; this.Description = description; this.EventVersion = 1; this.Name = name; this.OccurredOn = DateTime.Now; this.ProductId = productId; this.ProductOwnerId = productOwnerId; this.TenantId = tenantId; }
public ProductDiscussionRequested( TenantId tenantId, ProductId productId, ProductOwnerId productOwnerId, string name, string description, bool requestingDiscussion) { Description = description; EventVersion = 1; Name = name; OccurredOn = DateTime.Now; ProductId = productId; ProductOwnerId = productOwnerId; RequestingDiscussion = requestingDiscussion; TenantId = tenantId; }
public ProductOwner ProductOwnerOfIdentified(ProductOwnerId productOwnerId) { throw new System.NotImplementedException(); }