Here are the examples of the csharp api class hdsdump.f4m.URL.normalizeRootURL(string) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
2 Examples
0
1. Example
View licensepublic static string getAbsoluteUrl(string baseUrl, string url) { if (string.IsNullOrEmpty(url)) return string.Empty; if (string.IsNullOrEmpty(baseUrl)) return url; return new System.Uri(new System.Uri(normalizeRootURL(baseUrl)), url).AbsoluteUri; }
0
2. 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); }