示例#1
0
 public void When(AuctionOpened @event)
 {
     EndDate       = @event.EndDate;
     StartDate     = @event.StartDate;
     StartingPrice = @event.StartingPrice;
     SellerId      = @event.SellerId;
 }
示例#2
0
        //public override void Apply(DomainEvent @event)
        //{
        //    When((dynamic) @event);
        //}

        private void When(AuctionOpened @event)
        {
            this.Id            = @event.Id;
            this.SellerId      = @event.SellerId;
            this.StartingPrice = @event.StartingPrice;
            this.Product       = @event.Product;
            this.EndDate       = @event.EndDate;
        }
 private void Apply(AuctionOpened @event)
 {
     this.Id                 = @event.Id;
     this.EndDateTime        = @event.EndDateTime;
     this.ProductDescription = @event.ProductDescription;
     this.SellerId           = @event.SellerId;
     this.StartingPrice      = @event.StartingPrice;
 }
示例#4
0
        public Auction(long auctionId, long sellerId, long startingPrice, DateTime endDate)
        {
            var @event = new AuctionOpened(auctionId, sellerId, startingPrice, endDate);

            Apply(@event);
        }