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

API review: IScopedInstance needs design discussion #186

Closed
muratg opened this issue Mar 4, 2015 · 8 comments
Closed

API review: IScopedInstance needs design discussion #186

muratg opened this issue Mar 4, 2015 · 8 comments
Assignees
Milestone

Comments

@muratg
Copy link

muratg commented Mar 4, 2015

  • What do we do with this interface?
  • ScopedInstance also needs to be discussed
@muratg muratg added the question label Mar 4, 2015
@muratg muratg added this to the 1.0.0-rc1 milestone Mar 4, 2015
@davidfowl
Copy link
Member

@HaoK @rynowak @dougbu @divega

Is it just MVC that uses this? We'd like to get rid or it.

/cc @lodejard

@dougbu
Copy link
Member

dougbu commented Mar 9, 2015

@davidfowl a quick search of Universe shows IScopedInstance use in MVC and Entropy (but that's probably MVC-related). MVC uses the interface / default implementation to make some per-request contexts (ActionContext, ActionBindingContext, and AntiForgeryContext) available to MVC services without sticking the contexts directly into DI. are you suggesting we move IScopedInstance and ScopedInstance into MVC?

@HaoK
Copy link
Member

HaoK commented Mar 9, 2015

Yeah when I did the rename i think it was only MVC/Entropy as well. +1 to just move these to MVC

@HaoK
Copy link
Member

HaoK commented Mar 9, 2015

Some more context in Issue #49, it made more sense in DI when HttpContext was using this as part of the RequestContainer/Hosting code. But now that hosting is using its own HttpContextAccessor, there doesn't seem to be a reason to keep this shared anymore

@davidfowl
Copy link
Member

Yea, I think step 1 is to remove the it from DI and step 2 is to figure out if MVC should be using this pattern at all. Last we discussed it it was an anti pattern like ITypeActivator.

@muratg
Copy link
Author

muratg commented Mar 9, 2015

Who would be doing the first step (i.e. remove it from DI and move it to MVC temporarily)? @rynowak

@HaoK
Copy link
Member

HaoK commented Mar 9, 2015

I can do step 1 if needed, it shouldn't be hard

@muratg muratg assigned HaoK and unassigned glennc Mar 9, 2015
@muratg
Copy link
Author

muratg commented Mar 9, 2015

👍 Thanks!

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

5 participants