Skip to content

Make IResults types public #40704

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 30 commits into from
Mar 20, 2022

Conversation

brunolins16
Copy link
Member

Fix #40656

@ghost ghost added the area-runtime label Mar 14, 2022
@brunolins16 brunolins16 added old-area-web-frameworks-do-not-use *DEPRECATED* This label is deprecated in favor of the area-mvc and area-minimal labels and removed area-runtime labels Mar 15, 2022
@brunolins16 brunolins16 requested a review from a team March 18, 2022 07:37
@brunolins16 brunolins16 marked this pull request as ready for review March 18, 2022 07:38
public async Task ExecuteAsync(HttpContext httpContext)
{
var logger = httpContext.RequestServices.GetRequiredService<ILogger<ChallengeResult>>();
var logger = httpContext.RequestServices.GetRequiredService<ILogger<ChallengeHttpResult>>();
Copy link
Member

Choose a reason for hiding this comment

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

Do we care about changing log categories? I could see that being considered a breaking change. I don't see a huge benefit of changing it other than slightly cleaner code. @BrennanConroy @davidfowl

Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is super important for preview3, but I'd like to clarify our stance on changing log categories in general.

Copy link
Member

Choose a reason for hiding this comment

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

Changing categories is considered a breaking change, example

// We create the logger with a string to preserve the logging namespace after the server side transport renames.
_logger = loggerFactory.CreateLogger("Microsoft.AspNetCore.Http.Connections.Internal.Transports.WebSocketsTransport");

Copy link
Member Author

Choose a reason for hiding this comment

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

So, i think we should not change the categories. I have pushed a commit following @BrennanConroy example.

@halter73 / @BrennanConroy can you do a quick review? 00877b5

/// <summary>
/// Gets the Content-Type header for the response.
/// </summary>
public string ContentType { get; internal set; }
Copy link
Member

Choose a reason for hiding this comment

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

nbd, but why internal set; instead of internal init; or just get;?

@brunolins16 brunolins16 enabled auto-merge (squash) March 19, 2022 00:13
@brunolins16 brunolins16 merged commit db7d513 into dotnet:main Mar 20, 2022
@ghost ghost added this to the 7.0-preview3 milestone Mar 20, 2022
@brunolins16 brunolins16 linked an issue Mar 21, 2022 that may be closed by this pull request
@brunolins16 brunolins16 deleted the brunolins16/iresult-apisuggestion branch August 2, 2022 20:49
@terryaney
Copy link

What version is this going to be released in? 8?

@ghost
Copy link

ghost commented Jan 25, 2023

Hi @terryaney. It looks like you just commented on a closed PR. The team will most probably miss it. If you'd like to bring something important up to their attention, consider filing a new issue and add enough details to build context.

@BrennanConroy
Copy link
Member

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

Make IResult concrete types public Make IResult methods more testable
5 participants