private void CreateServices(IServiceFactory svcFactory, IServiceContainer sc, DecompilerMenus dm) { sc.AddService <DecompilerHost>(this); config = svcFactory.CreateDecompilerConfiguration(); sc.AddService(typeof(IConfigurationService), config); var cmdFactory = new Commands.CommandFactory(sc); sc.AddService <ICommandFactory>(cmdFactory); sc.AddService(typeof(IStatusBarService), (IStatusBarService)this); diagnosticsSvc = svcFactory.CreateDiagnosticsService(form.DiagnosticsList); sc.AddService(typeof(IDiagnosticsService), diagnosticsSvc); decompilerSvc = svcFactory.CreateDecompilerService(); sc.AddService(typeof(IDecompilerService), decompilerSvc); uiSvc = svcFactory.CreateShellUiService(form, dm); subWindowCommandTarget = uiSvc; sc.AddService(typeof(IDecompilerShellUiService), uiSvc); sc.AddService(typeof(IDecompilerUIService), uiSvc); var codeViewSvc = new CodeViewerServiceImpl(sc); sc.AddService <ICodeViewerService>(codeViewSvc); var segmentViewSvc = new ImageSegmentServiceImpl(sc); sc.AddService(typeof(ImageSegmentService), segmentViewSvc); var del = svcFactory.CreateDecompilerEventListener(); workerDlgSvc = (IWorkerDialogService)del; sc.AddService(typeof(IWorkerDialogService), workerDlgSvc); sc.AddService(typeof(DecompilerEventListener), del); loader = svcFactory.CreateLoader(); sc.AddService <ILoader>(loader); var abSvc = svcFactory.CreateArchiveBrowserService(); sc.AddService <IArchiveBrowserService>(abSvc); sc.AddService <ILowLevelViewService>(svcFactory.CreateMemoryViewService()); sc.AddService <IDisassemblyViewService>(svcFactory.CreateDisassemblyViewService()); var tlSvc = svcFactory.CreateTypeLibraryLoaderService(); sc.AddService <ITypeLibraryLoaderService>(tlSvc); this.projectBrowserSvc = svcFactory.CreateProjectBrowserService(form.ProjectBrowser); sc.AddService <IProjectBrowserService>(projectBrowserSvc); var upSvc = svcFactory.CreateUiPreferencesService(); sc.AddService <IUiPreferencesService>(upSvc); var fsSvc = svcFactory.CreateFileSystemService(); sc.AddService <IFileSystemService>(fsSvc); this.searchResultsTabControl = svcFactory.CreateTabControlHost(form.TabControl); sc.AddService <ITabControlHostService>(this.searchResultsTabControl); srSvc = svcFactory.CreateSearchResultService(form.FindResultsList); sc.AddService <ISearchResultService>(srSvc); searchResultsTabControl.Attach((IWindowPane)srSvc, form.FindResultsPage); searchResultsTabControl.Attach((IWindowPane)diagnosticsSvc, form.DiagnosticsPage); var resEditService = svcFactory.CreateResourceEditorService(); sc.AddService <IResourceEditorService>(resEditService); var cgvSvc = svcFactory.CreateCallGraphViewService(); sc.AddService <ICallGraphViewService>(cgvSvc); var viewImpSvc = svcFactory.CreateViewImportService(); sc.AddService <IViewImportsService>(viewImpSvc); }
private void CreateServices(IServiceFactory svcFactory, IServiceContainer sc) { sc.AddService <IDecompiledFileService>(svcFactory.CreateDecompiledFileService()); config = svcFactory.CreateDecompilerConfiguration(); sc.AddService(typeof(IConfigurationService), config); var cmdFactory = new Commands.CommandFactory(sc); sc.AddService <ICommandFactory>(cmdFactory); var sbSvc = svcFactory.CreateStatusBarService(); sc.AddService <IStatusBarService>(sbSvc); diagnosticsSvc = svcFactory.CreateDiagnosticsService(); sc.AddService(typeof(IDiagnosticsService), diagnosticsSvc); decompilerSvc = svcFactory.CreateDecompilerService(); sc.AddService(typeof(IDecompilerService), decompilerSvc); sc.AddService(typeof(IDecompilerUIService), uiSvc); var codeViewSvc = svcFactory.CreateCodeViewerService(); sc.AddService <ICodeViewerService>(codeViewSvc); var segmentViewSvc = svcFactory.CreateImageSegmentService(); sc.AddService(typeof(ImageSegmentService), segmentViewSvc); var del = svcFactory.CreateDecompilerEventListener(); workerDlgSvc = (IWorkerDialogService)del; sc.AddService(typeof(IWorkerDialogService), workerDlgSvc); sc.AddService(typeof(DecompilerEventListener), del); loader = svcFactory.CreateLoader(); sc.AddService <ILoader>(loader); var abSvc = svcFactory.CreateArchiveBrowserService(); sc.AddService <IArchiveBrowserService>(abSvc); sc.AddService <ILowLevelViewService>(svcFactory.CreateMemoryViewService()); sc.AddService <IDisassemblyViewService>(svcFactory.CreateDisassemblyViewService()); var tlSvc = svcFactory.CreateTypeLibraryLoaderService(); sc.AddService <ITypeLibraryLoaderService>(tlSvc); this.projectBrowserSvc = svcFactory.CreateProjectBrowserService(); sc.AddService <IProjectBrowserService>(projectBrowserSvc); this.procedureListSvc = svcFactory.CreateProcedureListService(); sc.AddService <IProcedureListService>(procedureListSvc); var upSvc = svcFactory.CreateUiPreferencesService(); sc.AddService <IUiPreferencesService>(upSvc); srSvc = svcFactory.CreateSearchResultService(); sc.AddService <ISearchResultService>(srSvc); var callHierSvc = svcFactory.CreateCallHierarchyService(); sc.AddService <ICallHierarchyService>(callHierSvc); this.searchResultsTabControl = svcFactory.CreateTabControlHost(); sc.AddService <ITabControlHostService>(this.searchResultsTabControl); var resEditService = svcFactory.CreateResourceEditorService(); sc.AddService <IResourceEditorService>(resEditService); var cgvSvc = svcFactory.CreateCallGraphViewService(); sc.AddService <ICallGraphViewService>(cgvSvc); var viewImpSvc = svcFactory.CreateViewImportService(); sc.AddService <IViewImportsService>(viewImpSvc); var symLdrSvc = svcFactory.CreateSymbolLoadingService(); sc.AddService <ISymbolLoadingService>(symLdrSvc); var selSvc = svcFactory.CreateSelectionService(); sc.AddService <ISelectionService>(selSvc); var testGenSvc = svcFactory.CreateTestGenerationService(); sc.AddService <ITestGenerationService>(testGenSvc); }
private void CreateServices(IServiceFactory svcFactory, IServiceContainer sc, DecompilerMenus dm) { sc.AddService<DecompilerHost>(this); config = svcFactory.CreateDecompilerConfiguration(); sc.AddService(typeof(IConfigurationService), config); var cmdFactory = new Commands.CommandFactory(sc); sc.AddService<ICommandFactory>(cmdFactory); sc.AddService(typeof(IStatusBarService), (IStatusBarService)this); diagnosticsSvc = svcFactory.CreateDiagnosticsService(form.DiagnosticsList); sc.AddService(typeof(IDiagnosticsService), diagnosticsSvc); decompilerSvc = svcFactory.CreateDecompilerService(); sc.AddService(typeof(IDecompilerService), decompilerSvc); uiSvc = svcFactory.CreateShellUiService(form, dm); subWindowCommandTarget = uiSvc; sc.AddService(typeof(IDecompilerShellUiService), uiSvc); sc.AddService(typeof(IDecompilerUIService), uiSvc); var codeViewSvc = new CodeViewerServiceImpl(sc); sc.AddService(typeof(ICodeViewerService), codeViewSvc); var segmentViewSvc = new ImageSegmentServiceImpl(sc); sc.AddService(typeof(ImageSegmentService), segmentViewSvc); var del = svcFactory.CreateDecompilerEventListener(); workerDlgSvc = (IWorkerDialogService)del; sc.AddService(typeof(IWorkerDialogService), workerDlgSvc); sc.AddService(typeof(DecompilerEventListener), del); loader = svcFactory.CreateLoader(); sc.AddService(typeof(ILoader), loader); var abSvc = svcFactory.CreateArchiveBrowserService(); sc.AddService(typeof(IArchiveBrowserService), abSvc); sc.AddService(typeof(ILowLevelViewService), svcFactory.CreateMemoryViewService()); sc.AddService(typeof(IDisassemblyViewService), svcFactory.CreateDisassemblyViewService()); var tlSvc = svcFactory.CreateTypeLibraryLoaderService(); sc.AddService(typeof(ITypeLibraryLoaderService), tlSvc); this.projectBrowserSvc = svcFactory.CreateProjectBrowserService(form.ProjectBrowser); sc.AddService<IProjectBrowserService>(projectBrowserSvc); var upSvc = svcFactory.CreateUiPreferencesService(); sc.AddService<IUiPreferencesService>(upSvc); var fsSvc = svcFactory.CreateFileSystemService(); sc.AddService<IFileSystemService>(fsSvc); this.searchResultsTabControl = svcFactory.CreateTabControlHost(form.TabControl); sc.AddService<ITabControlHostService>(this.searchResultsTabControl); srSvc = svcFactory.CreateSearchResultService(form.FindResultsList); sc.AddService<ISearchResultService>(srSvc); searchResultsTabControl.Attach((IWindowPane) srSvc, form.FindResultsPage); searchResultsTabControl.Attach((IWindowPane) diagnosticsSvc, form.DiagnosticsPage); var resEditService = svcFactory.CreateResourceEditorService(); sc.AddService<IResourceEditorService>(resEditService); }