private void Place(WinningBid newBid) { if (!FirstOffer() && WinningBid.WasMadeBy(newBid.Bidder)) { DomainEvents.Raise(new OutBid(Id, WinningBid.Bidder)); } WinningBid = newBid; DomainEvents.Raise(new BidPlaced(Id, newBid.Bidder, newBid.CurrentAuctionPrice.Amount, newBid.TimeOfBid)); }
private bool BidderIsIncreasingMaximumBidToNew(Offer offer) { return(WinningBid.WasMadeBy(offer.Bidder) && offer.MaximumBid.IsGreaterThan(WinningBid.MaximumBid)); }