Beispiel #1
0
 /// <summary>
 /// Take a partial URL (so not including protocol, domain, port) and make it full by
 /// Adding the protocol, domain, port etc. from the given localization
 /// </summary>
 public static string MakeFullUrl(string url, ILocalization loc)
 {
     if (url.StartsWith(loc.Path))
     {
         url = url.Substring(loc.Path.Length);
     }
     return(url.StartsWith("http") ? url : loc.GetBaseUrl() + url);
 }