aspnet / Mvc

[Archived] ASP.NET Core MVC is a model view controller framework for building dynamic web sites with clean separation of concerns, including the merged MVC, Web API, and Web Pages w/ Razor. Project moved to https://github.com/aspnet/AspNetCore
Apache License 2.0
5.62k stars 2.14k forks source link

[pubinternal] QueryCollection #8713

Closed MarcusKohnert closed 5 years ago

MarcusKohnert commented 5 years ago

Description of the problem: #8689

Microsoft.AspNetCore.Http.Internal.QueryCollection

Use case:

In UnitTests we instantiate concrete objects of type QueryCollection to assign those instances to httpContext.Request.Query to establish a test context.

httpContext.Request.Query = new QueryCollection(new Dictionary<string, StringValues>
{
    { "key1", "value1" },
    { "key2", "value2" }
})
pranavkm commented 5 years ago

cc @Tratcher

Tratcher commented 5 years ago

Does the pubternal effort extend beyond the MVC packages?

pranavkm commented 5 years ago

Not that I know of. @MarcusKohnert the type's not in one of the namespaces listed in the linked issue, there are no current plans to change it's pubternal status.

MarcusKohnert commented 5 years ago

👍 alright. Sorry for the confusion. Only searched for .Internal in our code base. Is this pubinternal thing a common pattern? I've never heard about it before. Will keep an eye out in the future.

Tratcher commented 5 years ago

It's common in our code base. I haven't seen it elsewhere.