common-service-locator

When would you use the Common Service Locator ?

I've been looking at the Common Service Locator as a way of abstracting my IoC container but I've been noticing that some people are strongly against this type of this. Do people recommend never using it? Always using it? or sometimes using it? If sometimes, then in what situations would you use it and what situations would you not use ...

Is the Common Service Locator widely used?

I'm working on a new project now, and have given some thought to the IoC setup. I'm aware that you shouldn't be depending on the service location pattern (much, anyway), but that there are just a few places in a well-structured application where it may be necessary. In that case, do you use the CommonServiceLocator project, or not bother...

IoC from start to finish

I'm quite sure that IoC is the way to go for my application. There are a ton of articles and even questions here on SO that discuss the different containers. I've read several blogs today with partial examples. I am personally leaning towards starting with the CommonServiceLocator and Unity as two way to solve the same problem -- I ju...

System.NullReferenceException with WhoCanHelpMe Unit Test

I'm working with a test project based on WhoCanHelpMe, which is based on Sharp Architecture, NHibernateValidator, etc. As its written the when_the_profile_tasks_is_asked_to_create_a_profile unit test creates the profile object and saves it without issue. Now the profile object is a CreateProfileDetails type that derives from their own V...

Ninject how to access kernel to create instances?

I am new to ninject using ninject 2.0. My application is hosted in asp.net mvc. Now i don't know how to access kernel created in my class library. I think i should create kernel in global.aspx and load all modules in it. But how can i make it available throughout application? protected void Application_Start() { Regist...

How can I define generic exports without relying on the IOC libraries?

I am working on a library which needs to make use of the common service locator (http://commonservicelocator.codeplex.com/) to provide generic IOC support in order that we don't conflict with any consumers. Obviously I don't want to reference the IOC frameworks directly in my project but I'm unsure as to how to annotate the parts such t...

How do I get the container instance back from ServiceLocation?

Is is possible to get the container instance back from ServiceLocation? I only see the ability to resolve instances of types, not register them. ...

How do I use Common Service Locator in Ninject 2

Changes in Ninject 2 say that Ninject support Common Service Locator, but how do I use it? I don't find any manual or sample. ...

Does the Common Service Locator support Mono .NET?

Does the Common Service Locator, used for "providing an abstraction over IoC containers and service locators", support Mono .NET? ...