Common Service Locator

Feb 10, 2011 at 4:14 PM


Nice work! Just one question: are you considering including support for the Common Service Locator? Yes, it is fairly easy to create one such adapter, but it would be nice if it could be included in the core Munq package.

Best regards,


Feb 13, 2011 at 7:47 PM

I don't want to add a dependency to the Common Service Locator in the core Munq dll.  However, I will look at creating a separate dll with implements the interface.

Feb 14, 2011 at 10:21 PM

That's what I meant. Thanks!


Feb 16, 2011 at 6:48 PM

Hi Matthew,

Can you implement common service locator? I can help if you have no time. Please tell me when can you do it?



Feb 16, 2011 at 6:51 PM

I join last post. When can it be done?

Best regards, Alexandr.

Feb 16, 2011 at 11:55 PM

Where are you planning to use the Common Service Locator implementation? If its MVC 3, then I've already implemented the IDependencyResolver in the MVC3 samples project.

I'm just figuring out how to create NuGet packages for everything, and then I'm gong to make a new release.  And yes, I'll get the CSL implementation in there too, in a week or two.  

Feb 17, 2011 at 3:51 AM

I've added the Munq.CommonServiceLocator project, which implements the MunqCommonServiceLocator.

To use it:

    var ioc = new Munq.Container();
    var serviceLocator = new Munq.MunqCommonServiceLocator(ioc);


I haven't tested it, so please try it out and tell me if I've messed up :)



Feb 20, 2011 at 9:00 PM

Hi Matthew,

I am making plugin architecture and in modules in some places call resolve method so i need one interface. I tryed CSL but come to decision that i need something better.

I am going to write a new one.



Feb 24, 2011 at 11:23 AM


Sorry, I didn't see your question. Well, I always use the CSL instead of the actual implementations, so I can haver better decoupling, not only in ASP.NET MVC projects.

I have checked out your code and will give it a try. Thanks!


Feb 24, 2011 at 11:33 AM

Hi again,

I cannot download some of your projects, namely, Munq.CommonServiceLocator, Munq.Mv3Samples and so on. I did a "svn co Munq" but I only get some of the folders. Is this a permission problem?