-
Notifications
You must be signed in to change notification settings - Fork 10.2k
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
Adding STJ Polymorphism to Result Types #46008
Merged
brunolins16
merged 33 commits into
dotnet:main
from
brunolins16:brunolins16/issues/44852-results
Feb 1, 2023
Merged
Changes from 32 commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
2143f21
Adding STJ Polymorphism to Result Types
brunolins16 0c87d13
Merge remote-tracking branch 'upstream/main' into brunolins16/issues/…
brunolins16 1e048d3
Renaming unittest
brunolins16 7485673
Adding unit tests
brunolins16 af1eba8
Adding more unit tests
brunolins16 84e1c77
Merge remote-tracking branch 'upstream/main' into brunolins16/issues/…
brunolins16 4a63010
Setting DefaultTypeInfoResolver
brunolins16 543c338
Merge remote-tracking branch 'upstream/main' into brunolins16/issues/…
brunolins16 cfbe2fd
Removing ISTrimmable
brunolins16 8c10b8c
Removing cache
brunolins16 cabe9c5
Merge remote-tracking branch 'upstream/main' into brunolins16/issues/…
brunolins16 a4229b3
Clean up
brunolins16 2be89fc
Avoiding multiple GetTypeInfo calls
brunolins16 c9ddbea
Merge remote-tracking branch 'upstream/main' into brunolins16/issues/…
brunolins16 8c09b97
Fixing JsonResult
brunolins16 52c3b9d
Clean up
brunolins16 3d7a9f9
clean up
brunolins16 891d909
Adding Json apis proposal
brunolins16 1fb0405
Merge remote-tracking branch 'upstream/main' into brunolins16/issues/…
brunolins16 e854667
Removing name change
brunolins16 990498c
Merge remote-tracking branch 'upstream/main' into brunolins16/issues/…
brunolins16 a2a972a
Fixing bad merge
brunolins16 ae9c2a4
Merge remote-tracking branch 'upstream/main' into brunolins16/issues/…
brunolins16 c2768f4
Fix build
brunolins16 610c7b1
PR review
brunolins16 1930364
PR Feedback
brunolins16 3b54e1a
Update for the approved API
brunolins16 205c6c6
PR review
brunolins16 fba0039
Update TypedResultsTests.cs
brunolins16 e39d168
Changing IsPolymorphicSafe
brunolins16 baf9036
Merge remote-tracking branch 'upstream/main' into brunolins16/issues/…
brunolins16 9df633e
Fixing notnull annotation
brunolins16 a070575
Remove blank line
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 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 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 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 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,11 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
namespace Microsoft.AspNetCore.Http; | ||
|
||
internal class JsonHttpResultTrimmerWarning | ||
{ | ||
public const string SerializationUnreferencedCodeMessage = "JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext."; | ||
public const string SerializationRequiresDynamicCodeMessage = "JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use the overload that takes a JsonTypeInfo or JsonSerializerContext."; | ||
|
||
} |
This file contains 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 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.
Remind me why this is unsafe after the other work we did to make the underlying JSON APIs that these call into safe?
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 is unsafe because it is the scenario where the user provides the options, could be resolved by DI or not, so, we need to check and initialize for reflection.