private static async Task Run() { var container = new Container(); DependenciesConfigurator.RegisterDependencies(container); container.Verify(VerificationOption.VerifyAndDiagnose); DisplayParameters(container); await container.GetInstance <IDataExportJob>().Start(); }
private static Container BuildContainer() { var container = new Container(); container.Options.AllowOverridingRegistrations = true; DependenciesConfigurator.RegisterDependencies(container); container.RegisterSingleton <IWebClientSettings, AppConfigurationWebClientSettings>(); container.Verify(VerificationOption.VerifyAndDiagnose); return(container); }
private Container CreateContainer() { var container = new Container(); container.Options.AllowOverridingRegistrations = true; DependenciesConfigurator.RegisterDependencies(container); // Overrides. container.RegisterSingleton <IErrorHandler, ErrorHandler>(); // UI services. container.RegisterSingleton <IPluginInitializer, PluginInitializer>(); container.RegisterSingleton <ICachedPredictionService, CachedPredictionService>(); container.RegisterSingleton <IDocumentSaveWatcher, DocumentSaveWatcher>(); container.RegisterSingleton <ISolutionWatcher, SolutionWatcher>(); container.RegisterSingleton <IVsBridge, VsBridge>(); container.RegisterSingleton <IImagesProvider, ImagesProvider>(); container.RegisterSingleton <ISettingsStore, SettingsStore>(); container.RegisterSingleton <IShowSettingsWindowCommand, ShowSettingsWindowCommand>(); container.RegisterSingleton <IShowPredictionsWindowCommand, ShowPredictionsWindowCommand>(); container.RegisterSingleton <IShowPredictionsPaneCommand, ShowPredictionsPaneCommand>(); container.Register <ISettingsViewModel, SettingsViewModel>(); container.Register <ISettingsView, SettingsView>(); container.Register <ISettingsWindow, SettingsWindow>(); container.RegisterInstance <Func <ISettingsWindow> >(() => container.GetInstance <ISettingsWindow>()); container.RegisterSingleton <IPredictionsViewModel, PredictionsViewModel>(); container.Register <IPredictionsView, PredictionsView>(); container.RegisterInstance <Func <IPredictionsView> >(() => container.GetInstance <IPredictionsView>()); container.Register <IPredictionsWindow, PredictionsWindow>(); container.RegisterInstance <Func <IPredictionsWindow> >(() => container.GetInstance <IPredictionsWindow>()); container.RegisterSingleton <IStatusWrapper, StatusWrapper>(); container.RegisterSingleton <ITitleBarButtonViewModel, TitleBarButtonViewModel>(); container.RegisterSingleton <TitleBarButton, TitleBarButton>(); container.RegisterSingleton <IPredictionsToolWindowController, PredictionsToolWindowController>(); container.Verify(VerificationOption.VerifyAndDiagnose); return(container); }