Here are the examples of the csharp api class hdsdump.f4m.URL.normalizeRelativeURL(string) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
1 Example
0
1. Example
View licensepublic static string normalizePathForURL(string url, bool removeFilePart) { if (string.IsNullOrEmpty(url)) return string.Empty; string result = url; System.Uri uri = new System.Uri(url); if (uri.IsAbsoluteUri) { result = uri.Scheme + "://" + uri.Host; if (((uri.Scheme=="http") && (uri.Port!=80)) || ((uri.Scheme == "https") && (uri.Port != 443))) { result += ":" + uri.Port; } string path = uri.LocalPath; if (path != null && path.Length > 0) { if (removeFilePart) { int index = path.LastIndexOf("/"); if (index >= 0) path = path.Substring(0, index+1); } if ((path.Length > 0) && (path[0]=='/')) { result += path; } else { result += "/" + normalizeRelativeURL(path); } } } return normalizeRootURL(result); }