Skip to content

Conversation

@twsouthwick
Copy link
Member

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

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)]
Copy link
Contributor

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?

Copy link
Member Author

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

@twsouthwick twsouthwick added this to the 2.0 milestone Jul 23, 2024
@twsouthwick twsouthwick enabled auto-merge (squash) July 23, 2024 23:17
}

public HttpException(string message, Exception innerException)
public HttpException(String message, Exception innerException)
Copy link
Member

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.

@twsouthwick twsouthwick merged commit 3d59a66 into main Jul 26, 2024
@twsouthwick twsouthwick deleted the fix-apis branch July 26, 2024 21:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Some methods don't resolve on .NET Framework

4 participants