Subtext.Framework.BlogInfo.GetAlternateHostAlias C# (CSharp) Метод

GetAlternateHostAlias() публичный статический Метод

If the host starts with www., gets the host without the www. If it doesn't start with www., returns the host with www.
public static GetAlternateHostAlias ( string host ) : string
host string Host.
Результат string
        public static string GetAlternateHostAlias(string host)
        {
            if (String.IsNullOrEmpty(host))
                throw new ArgumentException("Cannot get an alternative alias to a null host", "host");

            if (host.StartsWith("www.", StringComparison.CurrentCultureIgnoreCase))
                return StripWwwPrefixFromHost(host);
            else
                return "www." + host;
        }