I'm working on a WP7 app and using SimpleContainer as my IoC. I'm trying to figure out how to get a reference to an object that I'm registering in my bootstrapper:
public class AppBootstrapper : PhoneBootstrapper
protected override void Configure()
container = new PhoneContainer(this);
container.RegisterSingleton(typeof(EventAggregator), "EventAggregator", typeof(EventAggregator));
I'd like to be able to grab the EventAggregator in the constructor of one of my model objects so that I can publish messages to it. (I know how to use constructor injection, but I think it would make life difficult in this case because this object gets stored
in a list, which gets serialized into XML...)
But I can't figure out which object to use to resolve items from the container by name. The documentation on this is geared toward MEF examples. Any suggestions?