private string ResolveMatchedPath(FilePatternMatch matchedPath) { // Resolve the path to site root var relativePath = new PathString("/" + matchedPath.Path); return(RequestPathBase.Add(relativePath).ToString()); }
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); }