public GetAbsoluteUrl ( string relativeUrl ) : string | ||
relativeUrl | string | |
return | string |
public string GetAbsoluteUrl(string relativeUrl)
{
if (relativeUrl == null)
{
throw new ArgumentNullException("relativeUrl");
}
var retVal = relativeUrl;
if (!relativeUrl.IsAbsoluteUrl())
{
retVal = _basePublicUrl + "/" + relativeUrl.TrimStart('/').TrimEnd('/');
}
return new Uri(retVal).ToString();
}