Beispiel #1
0
        private static string GetMarketString(string content)
        {
            var lines = content.Split('\n');

            if (lines.Length <= 0)
            {
                return(string.Empty);
            }

            return(CommonParser.GetLineByKey(CONST_MarketsKey, lines));
        }
Beispiel #2
0
        public static IList <Symbol> Parse(string symbolString)
        {
            var emptyRes = new List <Symbol>();

            if (string.IsNullOrWhiteSpace(symbolString))
            {
                return(emptyRes);
            }

            var lines = symbolString.Split('\n');

            if (lines.Length < 4)
            {
                return(emptyRes);
            }

            var ids     = CommonParser.GetArrayValues(CommonParser.GetLineByKey(CONST_IdsKey, lines)).Split(',');
            var names   = CommonParser.GetNames(CommonParser.GetArrayValues(CommonParser.GetLineByKey(CONST_NamesKey, lines)));
            var codes   = CommonParser.GetArrayValues(CommonParser.GetLineByKey(CONST_CodesKey, lines)).Split(',');;
            var markets = CommonParser.GetArrayValues(CommonParser.GetLineByKey(CONST_MarketsKey, lines)).Split(',');

            return(BuildSymbols(ids, names, codes, markets));
        }