-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Support STJ Polymorphism #45405
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
Merged
brunolins16
merged 31 commits into
dotnet:main
from
brunolins16:brunolins16/issues/44852
Jan 10, 2023
Merged
Support STJ Polymorphism #45405
Changes from all commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
7cc182d
Initial GetTypeInfo usage
brunolins16 69ecc80
Merging 45359
brunolins16 fb1fabb
Using TypeInfoAPI
brunolins16 a2473bb
Merge branch 'main' into brunolins16/issues/44852
brunolins16 2eac02f
Updating comments
brunolins16 59e9b6e
Remove using
brunolins16 1e05325
Updating MVC support
brunolins16 044d219
Adding fastpath
brunolins16 0b7940f
Trying to fix mvc
brunolins16 32d7cf4
Updating mvc support
brunolins16 16f37f9
Simplify MVC
brunolins16 784d364
Moving more to fastpath
brunolins16 62edd21
Adding JsonOptions setup
brunolins16 5586708
Moving DefaultJsonTypeInfoResolver instance creation
brunolins16 d37a9c6
Merge branch 'main' into brunolins16/issues/44852
brunolins16 19b54b6
Fix bad merge
brunolins16 5f76c1b
Adding RDF unit tests
brunolins16 7657b25
Adding more RDF tests
brunolins16 c3f98bf
Adding MVC unit tests
brunolins16 e4eb4bd
Updating IL2026 warnings
brunolins16 84b7eb5
Scoping trimming warning
brunolins16 ca3809f
Updates
brunolins16 2c64c14
Merge remote-tracking branch 'upstream/main' into brunolins16/issues/…
brunolins16 6e87830
Changing to always JsonTypeInfo
brunolins16 7c6ef7c
Merge remote-tracking branch 'upstream/main' into brunolins16/issues/…
brunolins16 3e136b4
Adding JsonSerializerExtensions
brunolins16 bc162e6
Fixing warnings
brunolins16 0bdfb96
Apply suggestions from code review
brunolins16 71bb5b6
Updating suppression
brunolins16 534c62c
Adding IL3050
brunolins16 45bbd69
Merge remote-tracking branch 'upstream/main' into brunolins16/issues/…
brunolins16 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
src/Http/Http.Extensions/src/Microsoft.AspNetCore.Http.Extensions.WarningSuppressions.xml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<linker> | ||
<assembly fullname="Microsoft.AspNetCore.Http.Extensions, Version=8.0.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60"> | ||
<attribute fullname="System.Diagnostics.CodeAnalysis.UnconditionalSuppressMessageAttribute"> | ||
<argument>ILLink</argument> | ||
<argument>IL2026</argument> | ||
<property name="Scope">member</property> | ||
<property name="Target">M:Microsoft.AspNetCore.Http.Json.JsonOptions.CreateDefaultTypeResolver</property> | ||
<property name="Justification">This warning is left in the product so developers get an ILLink warning when trimming an app, in future, only when Microsoft.AspNetCore.EnsureJsonTrimmability=false.</property> | ||
brunolins16 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
</attribute> | ||
</assembly> | ||
</linker> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
182 changes: 138 additions & 44 deletions
182
src/Http/Http.Extensions/src/RequestDelegateFactory.cs
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Given that this is a global instance, I would recommend making it read-only from the get-go using the
JsonSerializerOptions.MakeReadOnly()
method.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.
I believe that here is too early to do this. Users still have a chance to chance the options at this point
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.
This will makes the code susceptible to races, in which multiple threads try to set potentially conflicting configuration to the same singleton.