Closed joshmachol closed 8 years ago
I see now that classes do not need to be registered manually if their constructor dependencies are registered. Closing this.
Hi Josh, this is correct, you do not have to register types explicitly. Here's more details: https://msdn.microsoft.com/en-us/library/ff660864(PandP.20).aspx
You can use the Unity container to generate instances of any object that has a public constructor (in other words, objects that you can create using the new operator), without registering a mapping for that type with the container. When you call the Resolve method and specify the default instance of a type that is not registered, the container simply calls the constructor for that type and returns the result.
I apologize in advance if the answer is obvious, but where do the majority of the view models get registered with the bootstrapper?
In
CategoriesView
we haveThis makes sense to me because in
ViewModelRegistry
we haveHowever, I can't make sense of how the other view models are registered. For example, in
AboutPage
we haveWhere does
AboutViewModel
get registered?