Пример #1
0
 public virtual void DeleteTradedStock(Stock stock)
 {
     if (StocksTraded.Contains(stock) && stock.MarketsTradedOn.Contains(this))
     {
         stock.MarketsTradedOn.Remove(this);
         StocksTraded.Remove(stock);
     }
 }
Пример #2
0
 public virtual void AddTradedStock(Stock stock)
 {
     if (!StocksTraded.Contains(stock) && !stock.MarketsTradedOn.Contains(this))
     {
         stock.MarketsTradedOn.Add(this);
         StocksTraded.Add(stock);
     }
 }