Skip to content

Move EmptyHttpResult to Http.Abstractions #46077

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 4 commits into from
Jan 13, 2023
Merged

Conversation

JamesNK
Copy link
Member

@JamesNK JamesNK commented Jan 13, 2023

This PR moves EmptyHttpResult to abstractions and adds a type forward. This allows us to no longer require reflection hacks to get a reference to EmptyHttpResult.Empty.

IMO this isn't just a change to make our code better. It is normal to have a "null" or "empty" value/implementation be part of the abstraction.

@JamesNK JamesNK added the old-area-web-frameworks-do-not-use *DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels label Jan 13, 2023
@ghost ghost added the area-runtime label Jan 13, 2023
@captainsafia
Copy link
Member

This change resolves: #41330

Overall, I'm fine with moving only the problematic type lower. I don't think there's other HttpResult types that need the same treatment.

Does this need an API review or does the type forward mitigate that?

@JamesNK
Copy link
Member Author

JamesNK commented Jan 13, 2023

Does this need an API review or does the type forward mitigate that?

From the user's perspective, nothing changes. Doesn't seem necessary. What do you think @halter73?

@halter73
Copy link
Member

halter73 commented Jan 13, 2023

This is a nonbreaking change that doesn't really add API. I don't think we have to API review type forwards. The only thing to discuss would be the assembly to move it to. I think normal PR review is sufficient.

@JamesNK
Copy link
Member Author

JamesNK commented Jan 13, 2023

Numbers!

And no more warnings from Http.Results.

Copy link
Member

@captainsafia captainsafia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@JamesNK JamesNK merged commit ce05ffd into main Jan 13, 2023
@JamesNK JamesNK deleted the jamesnk/emptyhttpresult-forward branch January 13, 2023 06:41
@ghost ghost added this to the 8.0-preview1 milestone Jan 13, 2023
@amcasey amcasey added area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions and removed area-runtime labels Aug 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-networking Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions old-area-web-frameworks-do-not-use *DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants