Sage.UrlGenerator.PrefixUrl C# (CSharp) 메소드

PrefixUrl() 공개 메소드

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.
리턴 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('/'));
        }