Ejemplo n.º 1
0
        void ReplaceUrlWithAbsoluteUrl(StringBuilder builder, Group matchedUrlGroup, string currentDirectory)
        {
            var url = matchedUrlGroup.Value;

            // URLs that start with a "/" are assumed to be rooted, not relative to the virtual directory.
            // So leave them as they are.
            if (url.StartsWith("/"))
            {
                return;
            }

            var absoluteUrl = urlGenerator.CreateAbsolutePathUrl(currentDirectory + "/" + url);

            builder.Remove(matchedUrlGroup.Index, matchedUrlGroup.Length);
            builder.Insert(matchedUrlGroup.Index, absoluteUrl);
        }
Ejemplo n.º 2
0
 public string CreateAbsolutePathUrl(string applicationRelativePath)
 {
     return(_inner.CreateAbsolutePathUrl(applicationRelativePath));
 }