This project is inspired by Rob Eisenberg's excellent
Caliburn Micro project.
As much as I love the framework - and it is astonishingly good - I wasn't mad on the SimpleContainer code that demonstrated IOC.
This code produces a single, small (~15k) dll that just drops into your WP7 project. Here's how to integrate into a Caliburn Micro for WP7 Bootstrapper:
public class TopBootstrapper : PhoneBootstrapper
private readonly IMicroIocContainer _container = new MicroIocContainer();
protected override void Configure()
protected override object GetInstance(Type service, string key)
return _container.Resolve(service, key);
protected override IEnumerable<object> GetAllInstances(Type service)
protected override void BuildUp(object instance)
Of course, you are not constrained to using Caliburn Micro to use this container - it works just nicely on its own.