-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Introduce the Results<TResult1, TResult2, TResultN> union types #40986
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
Merged
Changes from 17 commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
6c2cec8
Added the Results<T> class
DamianEdwards df7ac5e
Add ResultsOfT code generator
DamianEdwards b89af2e
Update Http.Results.ResultsOfT
DamianEdwards 2cb11bc
ResultsOfT updates
DamianEdwards 80efa17
ResultsOfT generator tweaks
DamianEdwards 5e2e0e1
Delete Results<TResult1>
DamianEdwards 751cbb1
ResultsOfT doc comment tweak
DamianEdwards b95f623
Move ResultOfT to Http namespace
DamianEdwards c10f2b0
Add tests for ResultsOfT
DamianEdwards 5d7d545
Code gen Results<TResutl1, TResult2, TResultN> tests
DamianEdwards 0eda77b
More Results<TResult1, TResultN> tests
DamianEdwards 6a0eae7
Result<T1, T2> code gen tweaks
DamianEdwards e457a0b
Fix build error
DamianEdwards b19bf91
PR feedback
DamianEdwards ccbc535
Implement API review feedback + more tests
DamianEdwards aacfa5a
Fix build errors/warnings
DamianEdwards 437537b
Fix PublicAPI.Unshipped.txt
DamianEdwards 768b5ee
Address PR feedback
DamianEdwards ebe5670
nit fix
DamianEdwards 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
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,13 @@ | ||
# ASP.NET Core Http.Results | ||
|
||
Http.Results contains the in-framework implementations of the `IResult` interface returned from Minimal APIs route handler delegates, e.g. `OkHttpResult`, `NoContentHttpResult`, etc. | ||
|
||
## Development Setup | ||
|
||
The `Results<TResult1, TResult2, TResultN>` union types are generated. Modify and run the [ResultsOfTGenerator](tools/ResultsOfTGenerator/) tool to generate an updated `ResultsOfT.cs` class file. | ||
|
||
Run the following command in `src\Http\Http.Results\tools\ResultsOfTGenerator`: | ||
|
||
``` | ||
dotnet run | ||
``` | ||
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.
Can we also add a test that fails if the generator and generated code get out of sync like Kestrel's GeneratedCodeIsUpToDate test?
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.
Done!