Esempio n. 1
0
        public IDictionary <string, MarketData> ParseData(JContainer json)
        {
            IDictionary <string, MarketData> marketDataDict = new Dictionary <string, MarketData>();

            if (!(json is JArray))
            {
                return(marketDataDict);
            }

            var jarray = (JArray)json;

            foreach (var marketJson in jarray.Children <JObject>())
            {
                try
                {
                    var marketData = MarketData.FromJson(marketJson);
                    marketDataDict[marketData.MIC] = marketData;
                }
                catch (Exception)
                {
                    // TODO : log error message
                    continue;
                }
            }
            return(marketDataDict);
        }