Beispiel #1
0
        public void StartBuying(string newItemId, int newItemMaximumPrice, int numberToBuy)
        {
            IStockItem stockItem = _warehouse.GetStockItemFor(newItemId);
            var        buyer     = new Buyer(newItemId, newItemMaximumPrice, numberToBuy, stockItem);

            stockItem.AddStockEventListener(buyer);
            _portfolio.AddBuyer(buyer);
        }