You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are 2 Uri constructors that are marked as obsolete, indicating the the dontEscape argument is deprecated and always false. Upon reviewing the code though, it seems the dontEscape argument is indeed utilized with potentially-true values.
//// Uri(string, bool)//// Uri constructor. Assumes that input string is canonically escaped//[Obsolete("This constructor has been deprecated; the dontEscape parameter is always false. Use Uri(string) instead.")]public Uri(stringuriString,booldontEscape){if(uriString==null)thrownew ArgumentNullException(nameof(uriString));
CreateThis(uriString, dontEscape, UriKind.Absolute);
DebugSetLeftCtor();}//// Uri(Uri, string, bool)//// Uri combinatorial constructor. Do not perform character escaping if// DontEscape is true//[Obsolete("This constructor has been deprecated; the dontEscape parameter is always false. Use Uri(Uri, string) instead.")]public Uri(UribaseUri,string?relativeUri,booldontEscape){if(baseUri isnull)thrownew ArgumentNullException(nameof(baseUri));if(!baseUri.IsAbsoluteUri)thrownew ArgumentOutOfRangeException(nameof(baseUri));
CreateUri(baseUri, relativeUri, dontEscape);
DebugSetLeftCtor();}
Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.
Issue Details
There are 2 Uri constructors that are marked as obsolete, indicating the the dontEscape argument is deprecated and always false. Upon reviewing the code though, it seems the dontEscape argument is indeed utilized with potentially-true values.
//// Uri(string, bool)//// Uri constructor. Assumes that input string is canonically escaped//[Obsolete("This constructor has been deprecated; the dontEscape parameter is always false. Use Uri(string) instead.")]public Uri(stringuriString,booldontEscape){if(uriString==null)thrownew ArgumentNullException(nameof(uriString));
CreateThis(uriString, dontEscape, UriKind.Absolute);
DebugSetLeftCtor();}//// Uri(Uri, string, bool)//// Uri combinatorial constructor. Do not perform character escaping if// DontEscape is true//[Obsolete("This constructor has been deprecated; the dontEscape parameter is always false. Use Uri(Uri, string) instead.")]public Uri(UribaseUri,string?relativeUri,booldontEscape){if(baseUri isnull)thrownew ArgumentNullException(nameof(baseUri));if(!baseUri.IsAbsoluteUri)thrownew ArgumentOutOfRangeException(nameof(baseUri));
CreateUri(baseUri, relativeUri, dontEscape);
DebugSetLeftCtor();}
There are 2
Uri
constructors that are marked as obsolete, indicating the thedontEscape
argument is deprecated and always false. Upon reviewing the code though, it seems thedontEscape
argument is indeed utilized with potentially-true
values.Originally posted by @jkotas in #56690 (comment)
The text was updated successfully, but these errors were encountered: