private void OnAuctionCreated(AuctionCreated auctionCreated) { Id = auctionCreated.AuctionId; Item = auctionCreated.Item; MinimumPrice = auctionCreated.MinimumPrice; Created = auctionCreated.Time; CreatedBy = auctionCreated.UserId; }
public Auction(Item item, Guid userId, uint minimumPrice) : this() { if (item == null) { throw new ArgumentNullException("item"); } if (userId == Guid.Empty) { throw new ArgumentNullException("userId"); } var createdEvent = new AuctionCreated() { AuctionId = Guid.NewGuid(), Time = DateTime.Now, Item = item, MinimumPrice = minimumPrice, UserId = userId }; base.RaiseEvent(createdEvent); }