It could seem a stupid question because in my code everything is working, but I\'ve registered a singleton this way with my Unity container _ambientContainer
:
I'm assuming that the ServiceLocator
type is from the CommonServiceLocator project, and that you're using the Unity adapter, in which case GetInstance
invokes container.Resolve
, so both lines are equivalent.
You can view the source here - http://commonservicelocator.codeplex.com/wikipage?title=Unity%20Adapter&referringTitle=Home