Esempio n. 1
0
        public string MapPath(string virtualPath)
        {
            // Need to prevent extra slashes
            string prefix = ApplicationPath.EndsWith("/", StringComparison.OrdinalIgnoreCase) ? "~/" : "~";

            return(virtualPath.Replace(prefix, ApplicationPath));
        }
Esempio n. 2
0
        private string GetPath(string root, Module module)
        {
            var fullpath = root;

            if (!ApplicationPath.EndsWith("/"))
            {
                fullpath = string.Concat(fullpath, "/");
            }
            fullpath = string.Concat(fullpath, module.GroupUrl.Trim('/'), "/");
            fullpath = string.Concat(fullpath, module.Url.Trim('/'));

            return(ResolveUrl(fullpath));
        }