/// <summary> /// Initializes the specified stock infos. /// </summary> /// <param name="stockInformations">The stock informations.</param> public virtual void Initialize(IEnumerable <StockInformation> stockInformations) { Assert.ArgumentNotNull(stockInformations, "stockInformations"); var stockInfos = stockInformations as IList <StockInformation> ?? stockInformations.ToList(); if (!stockInfos.Any()) { return; } foreach (var info in stockInfos) { var stockInfo = new StockInfoBaseJsonResult(); stockInfo.Initialize(info); this._stockInformations.Add(stockInfo); } }
/// <summary> /// Initializes the specified stock infos. /// </summary> /// <param name="stockInformations">The stock informations.</param> public virtual void Initialize(IEnumerable<StockInformation> stockInformations) { Assert.ArgumentNotNull(stockInformations, "stockInformations"); var stockInfos = stockInformations as IList<StockInformation> ?? stockInformations.ToList(); if (!stockInfos.Any()) { return; } foreach (var info in stockInfos) { var stockInfo = new StockInfoBaseJsonResult(); stockInfo.Initialize(info); this._stockInformations.Add(stockInfo); } }