System.Security.Util.URLString.NormalizeUrl C# (CSharp) Method

NormalizeUrl() private method

private NormalizeUrl ( ) : String
return String
        internal String NormalizeUrl()
        {
            StringBuilder builtUrl = new StringBuilder();
            DoDeferredParse();

            if (String.Compare( m_protocol, "file", StringComparison.OrdinalIgnoreCase) == 0)
            {
#if !PLATFORM_UNIX
                builtUrl = builtUrl.AppendFormat("FILE:///{0}/{1}", m_localSite.ToString(), m_directory.ToString());
#else
                builtUrl = builtUrl.AppendFormat("FILE:///{0}", m_directory.ToString());
#endif // !PLATFORM_UNIX
            }
            else
            {
                builtUrl = builtUrl.AppendFormat("{0}://{1}{2}", m_protocol, m_userpass, m_siteString.ToString());

                if (m_port != -1)
                    builtUrl = builtUrl.AppendFormat("{0}",m_port);

                builtUrl = builtUrl.AppendFormat("/{0}", m_directory.ToString());
            }

            return builtUrl.ToString().ToUpper(CultureInfo.InvariantCulture);
        }