Beispiel #1
0
        public void RefreshTestSources()
        {
            Tools.SetJasmineVersion(JasmineVersion);
            JasmineDts = Tools.JasmineDtsPath;
            var res = new List <string>(TestSources?.Count ?? 4);

            if (TestSourcesRegExp != null)
            {
                var fileRegex = new Regex(TestSourcesRegExp, RegexOptions.CultureInvariant);
                if (TestDirectories != null)
                {
                    foreach (var dir in TestDirectories)
                    {
                        var dc = Owner.DiskCache.TryGetItem(PathUtils.Join(Owner.Owner.FullPath, dir)) as IDirectoryCache;
                        if (dc != null && !dc.IsInvalid)
                        {
                            RecursiveFileSearch(dc, Owner.DiskCache, fileRegex, res);
                        }
                    }
                }
                else
                {
                    RecursiveFileSearch(Owner.Owner, Owner.DiskCache, fileRegex, res);
                }
            }

            res.Sort(StringComparer.Ordinal);
            if (TestSources == null || !TestSources.SequenceEqual(res))
            {
                TestSources = res;
            }
        }
Beispiel #2
0
        public void RefreshTestSources()
        {
            Tools.SetJasmineVersion(JasmineVersion);
            JasmineDts = Tools.JasmineDtsPath;
            var res = new List <string>(TestSources?.Count ?? 4);

            if (TestSourcesRegExp != null)
            {
                var fileRegex = new Regex(TestSourcesRegExp, RegexOptions.CultureInvariant);
                RecursiveFileSearch(Owner.Owner, Owner.DiskCache, fileRegex, res);
            }

            TestSources = res;
        }