private void analysis(string content)
        {
            var arr = content.Split('\n').Skip(1).ToArray();

            arr = arr.Take(arr.Length - 1).Select(t => t.Trim()).ToArray();
            foreach (var item in arr)
            {
                Items.Add(JSScriptItem.Parse(item));
            }
        }
Exemple #2
0
        public static JSScriptItem Parse(string content)
        {
            int          index = content.IndexOf("(", StringComparison.Ordinal);
            var          name  = content.Substring(0, index);
            JSScriptItem item  = new JSScriptItem(name);
            var          para  = content.Substring(index + 1, content.Length - 3 - index);

            item.Params = para.Split(new[] { "," }, StringSplitOptions.RemoveEmptyEntries).Select(t => t.Trim().Trim('\"')).ToList();
            item.loadItemName();
            return(item);
        }