CommonServiceLocator for MEF, a service is a service.

Today, I finally got around to uploading a CommonServiceLocator adapter for MEF. The code is actually quite simple thanks to Chris Tavares providing ServiceLocatorImplBase. (Updated thanks to feedback from several folks) public class MefServiceLocator : ServiceLocatorImplBase { private ExportProvider _provider; public MefServiceLocator(ExportProvider provider) { _provider = provider; } protected override object DoGetInstance(Type serviceType, string key)…

2

IServiceLocator a step toward IoC container / Service locator detente

Today we launched an exciting project on CodePlex, namely the Common Service Locator library. What is it? It’s a shared interface that applications and frameworks can reference in order to leverage IoC containers / service location mechanisms without taking hard dependencies. The dominoes all fell like this. It all started with Jeremy Miller’s post. This then…

6