/// <include file='doc\uribuilder.uex' path='docs/doc[@for="UriBuilder.UriBuilder5"]/*' /> /// <devdoc> /// <para>[To be supplied.]</para> /// </devdoc> public UriBuilder(string scheme, string host, int port, string pathValue ) : this(scheme, host, port) { bool escaped; Path = Uri.EscapeString(ConvertSlashes(pathValue), false, out escaped); }
private string Format(string s, UriFormat format) { if (s.Length == 0) { return(String.Empty); } switch (format) { case UriFormat.UriEscaped: return(Uri.EscapeString(s, Uri.EscapeCommonHexBrackets)); case UriFormat.SafeUnescaped: return(Uri.UnescapeDataString(s, true)); case UriFormat.Unescaped: return(Uri.Unescape(s, false)); default: throw new ArgumentOutOfRangeException("format"); } }
private string Format(string s, UriFormat format) { if (s.Length == 0) { return(string.Empty); } switch (format) { case UriFormat.UriEscaped: return(Uri.EscapeString(s, escapeReserved: false, escapeHex: true, escapeBrackets: true)); case UriFormat.SafeUnescaped: s = Uri.Unescape(s, excludeSpecial: false); return(s); case UriFormat.Unescaped: return(Uri.Unescape(s, excludeSpecial: false)); default: throw new ArgumentOutOfRangeException("format"); } }
private string Format(string s, UriFormat format) { if (s.Length == 0) { return(String.Empty); } switch (format) { case UriFormat.UriEscaped: return(Uri.EscapeString(s, false, true, true)); case UriFormat.SafeUnescaped: // TODO subset of escape rules s = Uri.Unescape(s, false); return(s); //Uri.EscapeString (s, false, true, true); case UriFormat.Unescaped: return(Uri.Unescape(s, false)); default: throw new ArgumentOutOfRangeException("format"); } }