Inject EventAggregator into ViewModel with Caliburn Micro
问题 Extracted from the Caliburn Micro documentation on EventAggregator: // Creating the EventAggregator as a singleton. public class Bootstrapper : BootstrapperBase { private readonly SimpleContainer _container = new SimpleContainer(); // ... Other Bootstrapper Config protected override void Configure(){ _container.Singleton<IEventAggregator, EventAggregator>(); } // ... Other Bootstrapper Config } // Acquiring the EventAggregator in a viewModel. public class FooViewModel { private readonly