Exemplo n.º 1
0
        public static ParseCacheList Create(params ParseCache[] caches)
        {
            var pcl = new ParseCacheList();

            pcl.AddRange(caches);

            return(pcl);
        }
Exemplo n.º 2
0
        void parseDg(object o)
        {
            var tup = (Tuple <IEnumerable <string>, List <ParsePerformanceData> >)o;

            var parsedDirs = new List <string>();
            var newRoot    = new RootPackage();

            foreach (var dir in tup.Item1)
            {
                parsedDirs.Add(dir);

                var dir_abs = dir;
                if (!Path.IsPathRooted(dir))
                {
                    dir_abs = Path.Combine(FallbackPath, dir_abs);
                }

                var ppd = ThreadedDirectoryParser.Parse(dir_abs, newRoot);

                if (ppd != null)
                {
                    tup.Item2.Add(ppd);
                }
            }

            UfcsCache.Clear();
            ParsedDirectories = parsedDirs;
            Root = newRoot;

            // For performance boost, pre-resolve the object class
            HandleObjectModule(GetModule("object"));

            if (FinishedParsing != null)
            {
                FinishedParsing(tup.Item2.ToArray());
            }

            if (EnableUfcsCaching)
            {
                UfcsCache.Update(ParseCacheList.Create(this));

                if (FinishedUfcsCaching != null)
                {
                    FinishedUfcsCaching();
                }
            }
        }