protected override void Configure() { _container = new DefaultWinRTContainer(); _container.RegisterInstance(typeof(DefaultWinRTContainer), "", _container); _container.RegisterWinRTServices(); ServiceLocator.SetLocatorProvider(() => new CaliburnServiceLocator(_container)); // Hub metadata service _container.Singleton <IHubMetadataService, HubMetadataService>(); _container.RegisterSingleton(typeof(IHubViewModelBinder), "", typeof(CaliburnHubViewModelBinder)); // Insights service _container.RegisterInstance(typeof(IAppInsightsService), "AppInsights", _insightsService); // Modules _container.RegisterInstance(typeof(ModuleManager), "", this.ModuleManager); this.ModuleManager.InitializeAsync().Wait(); }
public CaliburnServiceLocator(DefaultWinRTContainer container) { _container = container; }