예제 #1
0
 public Trade(SalesPerson person, int quantity)
 {
     this.Person       = person;
     this.QuantitySold = quantity;
 }
예제 #2
0
 public void BuyStock(SalesPerson person, string item, int quantity)
 {
     _stock.AddOrUpdate(item, quantity, (key, oldvalue) => oldvalue + quantity);
     Interlocked.Add(ref _totalQuantityBought, quantity);
     _toDoQueue.AddTrade(new Trade(person, quantity));
 }