Exemple #1
0
        private string ResolveMatchedPath(FilePatternMatch matchedPath)
        {
            // Resolve the path to site root
            var relativePath = new PathString("/" + matchedPath.Path);

            return(RequestPathBase.Add(relativePath).ToString());
        }
Exemple #2
0
        private List <string> FindFiles(Matcher matcher)
        {
            var matches     = matcher.Execute(_baseGlobbingDirectory);
            var matchedUrls = new List <string>();

            foreach (var matchedPath in matches.Files)
            {
                // Resolve the path to site root
                var relativePath = new PathString("/" + matchedPath.Path);
                var matchedUrl   = RequestPathBase.Add(relativePath).ToString();
                var index        = matchedUrls.BinarySearch(matchedUrl, DefaultPathComparer);
                if (index < 0)
                {
                    // Item doesn't already exist. Insert it.
                    matchedUrls.Insert(~index, matchedUrl);
                }
            }

            return(matchedUrls);
        }