-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Add deprecation warning to Uri.UserEscaped property documentation #11467
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
Related: dotnet/runtime#56840 The existing obsoletion message is also misleading.
The argument still does something. @copilot Can we remove the |
…tion Co-authored-by: gewarren <24882762+gewarren@users.noreply.github.com>
You're absolutely right about the misleading "always false" claim. I've removed that language from the property documentation to avoid confusion. The documentation now simply states that the property is deprecated without making incorrect behavioral claims. See commit f440f4b. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you
The
Uri.UserEscaped
property documentation was missing a deprecation warning, causing confusion for developers who might expect it to work as originally designed.Problem:
The
Uri.UserEscaped
property references thedontEscape
parameter from Uri constructors, which has been obsolete since .NET Framework 4. The constructor parameter is now always treated asfalse
, meaningUserEscaped
will always returnfalse
, but the documentation didn't clearly indicate this deprecated behavior.Solution:
Added a prominent
[!CAUTION]
warning box to the property documentation that:dontEscape
parameter has been deprecated since .NET Framework 4 and always returnsfalse
Example of the warning:
Caution
The
Uri.UserEscaped
property represents deprecated functionality that will not work as expected. ThedontEscape
parameter referenced by this property has been deprecated since .NET Framework 4 and will always befalse
. As a result, this property will always returnfalse
and should not be used to determine URI escaping behavior.This follows the same deprecation warning pattern used elsewhere in the codebase (similar to
Uri.DnsSafeHost
property deprecation).Fixes #11436.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.