Ejemplo n.º 1
0
        public void BuyerAdded(Buyer buyer)
        {
            var viewModel = new BuyerViewModel(buyer.Snapshot.ItemId, buyer.Snapshot);

            Buyers.Add(viewModel);
            buyer.AddBuyerListener(this);
        }
Ejemplo n.º 2
0
        private void Join()
        {
            IStockItemConnection itemConnection = _connection.ConnectToItem(NewItemId);
            var viewModel = new BuyerViewModel(NewItemId, NewItemMaximumPrice, NumberToBuy,
                                               _buyerName, itemConnection, _repository);

            Buyers.Add(viewModel);
        }
Ejemplo n.º 3
0
        public void BuyerStateChanged(BuyerSnapshot snapshot)
        {
            BuyerViewModel viewModel = Buyers.Single(x => x.ItemId == snapshot.ItemId);

            viewModel.UpdateState(snapshot);
        }