-
Notifications
You must be signed in to change notification settings - Fork 65
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
Remove or fix APIs that were ported with different signatures #510
Conversation
This is to fix a few APIs where the APIs ported did not match .NET Framework, so using those methods would throw at runtime. The only API removed in this is HttpRequest.LogonUserIdentity - we can investigate adding it back if needed. The rest of the APIs now match framework and tests are in place to ensure going forward no regressions or repeats of this issue occur. Fixes #486
|
||
[SuppressMessage("Microsoft.Naming", "CA1716:IdentifiersShouldNotMatchKeywords", MessageId = "Date", | ||
Justification = "Matches HttpCachePolicy class")] | ||
[SuppressMessage("Naming", "CA1716:Identifiers should not match keywords", Justification = Constants.ApiFromAspNet)] |
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.
Looks like you've removed the SetCacheability overload here... Was that intentional?
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.
Yes - it wasn't implemented on HttpCachePolicy itself so we couldn't forward it in the wrapper correctly. Happy to take a fix that implements it on all three as a follow up :) I've added tests to validate that the three (i.e. HttpContext/HttpContextBase/HttpContextWrapper) are all kept in sync when adding APIs and this case was causing failure
@@ -17,50 +18,32 @@ public HttpException(string message) : base(message) | |||
{ | |||
} | |||
|
|||
public HttpException(string message, Exception innerException) | |||
public HttpException(String message, Exception innerException) |
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.
Super nit-pick but this change seems unnecessary. We use string
everywhere else in this file.
This is to fix a few APIs where the APIs ported did not match .NET Framework, so using those methods would throw at runtime. The only API removed in this is HttpRequest.LogonUserIdentity - we can investigate adding it back if needed. The rest of the APIs now match framework and tests are in place to ensure going forward no regressions or repeats of this issue occur.
Fixes #486