Skip to content
This repository has been archived by the owner on Nov 20, 2018. It is now read-only.

Move HttpContextAccessor from .Internal namespace #549

Closed
davidfowl opened this issue Jan 30, 2016 · 6 comments
Closed

Move HttpContextAccessor from .Internal namespace #549

davidfowl opened this issue Jan 30, 2016 · 6 comments
Assignees
Milestone

Comments

@davidfowl
Copy link
Member

If users want to use this API they need to call

services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();

Today this requires adding using Microsoft.AspNet.Http.Internal;

@davidfowl davidfowl added the bug label Jan 30, 2016
@davidfowl davidfowl added this to the 1.0.0-rc2 milestone Jan 30, 2016
@dougbu
Copy link
Member

dougbu commented Mar 18, 2016

Suggest we take this further and move everything or almost everything our own repos depend on from .Internal into a public namespace. Right now Antiforgery, BasicMiddleware, CORS, Diagnostics, Entropy, Hosting, Identity, ... all use HttpAbstraction's .Internal namespaces. And all such namespaces defined in this repo except Microsoft.AspNetCore.Http.Authentication.Internal have references from other repos.

@muratg
Copy link

muratg commented Mar 23, 2016

@dougbu Good to close?

@dougbu
Copy link
Member

dougbu commented Mar 23, 2016

No. I'm doing more of this in concert w/ the #592 fix at @davidfowl's urging.

@dougbu
Copy link
Member

dougbu commented Mar 25, 2016

Taking this one because we're tying fix together w/ #592 i.e. will do one set of reaction PRs.

@dougbu
Copy link
Member

dougbu commented Mar 26, 2016

Will move the following types to Microsoft.AspNetCore.Http. All of these are currently used in other aspnet repo's product code.

  • DefaultHttpContext
  • FormCollection (though not mainstream, necessary for some scenarios e.g. handling a form-URL-encoded response as in aspnet/Security)
  • HeaderDictionary
  • HttpContextAccessor (remains the most important of these changes because it's necessary for any use of the IHttpContextAccessor feature e.g. in aspnet/Identity)
  • HttpContextFactory

Will also move files around in the repo so the remaining Microsoft.AspNetCore.Http.Internal classes are in an Internal sub-folder.

dougbu added a commit that referenced this issue Mar 30, 2016
…rnal` namespaces

- #549, #592
- move feature implementations to `Microsoft.AspNetCore.Http.Features` and `...Authentication.Features`
- move `DefaultHttpContext`, `HttpContextAccessor`, `HttpContextFactory`, `FormCollection` and
  `HeaderDictionary` to `Microsoft.AspNetCore.Http`
- move `FormFile` to `Microsoft.AspNetCore.Http.Internal`
 - that and `Microsoft.AspNetCore.Http.Authentication.Internal` are the remaining `.Internal` namespaces

nits:
- remove a couple of parameterless constructors
- add / fill subfolders to align with new namespaces
- remove all use of (unnecessary) "T:..." `<see cref=""/>` values
dougbu added a commit to aspnet/Hosting that referenced this issue Mar 30, 2016
dougbu added a commit to aspnet/KestrelHttpServer that referenced this issue Mar 30, 2016
dougbu added a commit to aspnet/HttpSysServer that referenced this issue Mar 30, 2016
dougbu added a commit to aspnet/IISIntegration that referenced this issue Mar 30, 2016
dougbu added a commit to aspnet/CORS that referenced this issue Mar 30, 2016
dougbu added a commit to aspnet/Routing that referenced this issue Mar 30, 2016
dougbu added a commit to aspnet/StaticFiles that referenced this issue Mar 30, 2016
dougbu added a commit to aspnet/Antiforgery that referenced this issue Mar 30, 2016
dougbu added a commit to aspnet/Diagnostics that referenced this issue Mar 30, 2016
dougbu added a commit to aspnet/Security that referenced this issue Mar 30, 2016
dougbu added a commit to aspnet/Mvc that referenced this issue Mar 30, 2016
dougbu added a commit to aspnet/Identity that referenced this issue Mar 30, 2016
dougbu added a commit to aspnet/Entropy that referenced this issue Mar 30, 2016
dougbu added a commit to aspnet/MusicStore that referenced this issue Mar 30, 2016
dougbu added a commit that referenced this issue Mar 30, 2016
…rnal` namespaces

- #549, #592
- move feature implementations to `Microsoft.AspNetCore.Http.Features` and `...Authentication.Features`
- move `DefaultHttpContext`, `HttpContextAccessor`, `HttpContextFactory`, `FormCollection` and
  `HeaderDictionary` to `Microsoft.AspNetCore.Http`
- move `FormFile` to `Microsoft.AspNetCore.Http.Internal`
 - that and `Microsoft.AspNetCore.Http.Authentication.Internal` are the remaining `.Internal` namespaces

nits:
- remove a couple of parameterless constructors
- add / fill subfolders to align with new namespaces
- remove all use of (unnecessary) "T:..." `<see cref=""/>` values
dougbu added a commit to aspnet/Hosting that referenced this issue Mar 30, 2016
dougbu added a commit to aspnet/KestrelHttpServer that referenced this issue Mar 30, 2016
dougbu added a commit to aspnet/HttpSysServer that referenced this issue Mar 30, 2016
dougbu added a commit to aspnet/IISIntegration that referenced this issue Mar 30, 2016
dougbu added a commit to aspnet/CORS that referenced this issue Mar 30, 2016
dougbu added a commit to aspnet/Routing that referenced this issue Mar 30, 2016
dougbu added a commit to aspnet/StaticFiles that referenced this issue Mar 30, 2016
dougbu added a commit to aspnet/Antiforgery that referenced this issue Mar 30, 2016
dougbu added a commit to aspnet/Diagnostics that referenced this issue Mar 30, 2016
dougbu added a commit to aspnet/Security that referenced this issue Mar 30, 2016
dougbu added a commit to aspnet/Mvc that referenced this issue Mar 30, 2016
dougbu added a commit to aspnet/Identity that referenced this issue Mar 30, 2016
dougbu added a commit to aspnet/Entropy that referenced this issue Mar 30, 2016
dougbu added a commit to aspnet/MusicStore that referenced this issue Mar 30, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants