示例#1
0
        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));
        }
示例#2
0
 private bool BidderIsIncreasingMaximumBidToNew(Offer offer)
 {
     return(WinningBid.WasMadeBy(offer.Bidder) && offer.MaximumBid.IsGreaterThan(WinningBid.MaximumBid));
 }