private static IEnumerable <M_StockWithPrice> AddPriceToStock(StockCollection stockCollection)
        {
            StockPriceLoader stockPriceLoader = new StockPriceLoader();

            return(stockCollection.EnumerateStocks()
                   .Select(stock => new M_StockWithPrice()
            {
                Stock = stock, Price = stockPriceLoader.Load(stock.Ticker)
            }));
        }
Пример #2
0
 private void SaveStocks()
 {
     _stocksRepository.SaveStocks(_stockCollection.EnumerateStocks());
 }