Sage.UrlGenerator.PrefixUrl C# (CSharp) Method

PrefixUrl() public method

Returns the specified url with the current ServerPrefix (if any) pre-pended to it.
/// is null. ///
public PrefixUrl ( string url ) : string
url string The URL to process.
return string
        public string PrefixUrl(string url)
        {
            if (string.IsNullOrEmpty(url))
                throw new ArgumentNullException("url");

            if (url.Contains("://"))
                return url;

            return string.Concat(this.ServerPrefix.TrimEnd('/'), "/", url.TrimStart('/'));
        }