public List <Security> GetSecurityInfo(List <string> tickers)
        {
            var resultList = new List <Security>();

            if (tickers != null && tickers.Count > 0)
            {
                using (var yahooAPI = new YahooAPIService())
                {
                    resultList = yahooAPI.GetMultipleSecurities(tickers);
                }
            }
            return(resultList);
        }
        /// <summary>
        /// Method takes a request for multiple tickers or multiple positions
        /// and sends a listed of updated data
        /// </summary>
        /// <param name="message"></param>
        /// <returns></returns>
        public async Task GetSecurityInfo(StockDataRequestMessage message)
        {
            var tickersToQuery = new List <string>();

            var positionsQuery = false;
            var tickersQuery   = false;

            if (message.Tickers != null && message.Tickers.Count > 0)
            {
                tickersToQuery = message.Tickers;
                tickersQuery   = true;
            }
            else if (message.Positions != null && message.Positions.Count > 0)
            {
                tickersToQuery = message.Positions.Select(s => s.Ticker).Distinct().ToList();
                positionsQuery = true;
            }

            using (var yahooAPI = new YahooAPIService())
            {
                var resultList = await yahooAPI.GetMultipleSecurities(tickersToQuery);

                //Return response. Message's boolean is True if this is a startup call of this method.
                if (message.IsStartupRequest && positionsQuery)
                {
                    Messenger.Default.Send <PositionPricingMessage>(new PositionPricingMessage(resultList, true));
                }
                else if (message.IsStartupRequest && tickersQuery)
                {
                    Messenger.Default.Send <StockDataResponseMessage>(new StockDataResponseMessage(resultList, true));
                }
                else
                {
                    Messenger.Default.Send <StockDataResponseMessage>(new StockDataResponseMessage(resultList, false));
                }
            }
        }