Esempio n. 1
0
        public void Unload()
        {
            KnownProjectBase.MetadataStore        = null;
            ViewNodeManager.EnsureLayoutRequired -= new EventHandler(this.ViewNodeManager_EnsureLayoutRequired);
            XamlPerformanceEvents.UnregisterEvents();
            this.services.RemoveService(typeof(AnnotationService));
            this.annotationService.Shutdown();
            IProjectTypeManager   service              = this.services.GetService <IProjectTypeManager>();
            IDocumentTypeManager  documentTypeManager  = this.services.GetService <IDocumentTypeManager>();
            IWindowService        windowService        = this.services.GetService <IWindowService>();
            IOptionsDialogService optionsDialogService = this.services.GetService <IOptionsDialogService>();

            this.services.GetService <ICommandService>().RemoveTarget(this.commandTarget);
            this.commandTarget = null;
            foreach (Tool tool in this.tools)
            {
                this.designerContext.ToolManager.Remove(tool);
            }
            this.services.RemoveService(typeof(ToolManager));
            this.services.RemoveService(typeof(SnappingEngine));
            this.services.RemoveService(typeof(IAttachedPropertyMetadataFactory));
            this.services.RemoveService(typeof(IOutOfBrowserDeploymentService));
            this.services.GetService <IDesignerDefaultPlatformService>().Dispose();
            this.services.RemoveService(typeof(IDesignerDefaultPlatformService));
            this.services.RemoveService(typeof(IHelpService));
            windowService.RemoveResourceDictionary(this.designSurfaceIcons);
            optionsDialogService.OptionsPages.Remove(this.unitsOptionsPage);
            optionsDialogService.OptionsPages.Remove(this.artboardOptionsPage);
            optionsDialogService.OptionsPages.Remove(this.viewOptionsPage);
            optionsDialogService.OptionsPages.Remove(this.annotationsOptionsPage);
            this.sharedColorSpaceManager.Unload();
            if (windowService.PaletteRegistry["Designer_ProjectPane"] != null)
            {
                ProjectPane content = (ProjectPane)windowService.PaletteRegistry["Designer_ProjectPane"].Content;
            }
            SceneViewModel.UnregisterPipelineTasks(this.services.GetService <ISchedulingService>());
            foreach (IProjectType projectType in this.projectTypes)
            {
                service.Unregister(projectType);
            }
            foreach (IDocumentType documentType in this.documentTypes)
            {
                documentTypeManager.Unregister(documentType);
            }
            this.projectTypes.Clear();
            this.documentTypes.Clear();
            this.designerContext.Uninitialize();
            this.designerContext = null;
            IAssemblyService assemblyService = this.services.GetService <IAssemblyService>();

            assemblyService.UnregisterPlatformResolver("Silverlight");
            assemblyService.UnregisterPlatformResolver(".NETFramework");
            this.silverLightAssemblyResolver.Dispose();
        }
Esempio n. 2
0
        public void Unload()
        {
            Microsoft.Expression.Framework.UserInterface.IWindowService service = this.services.GetService <Microsoft.Expression.Framework.UserInterface.IWindowService>();
            service.Closing -= new CancelEventHandler(this.WindowManager_Closing);
            Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Send, new DispatcherOperationCallback((object o) => {
                Application.Current.SessionEnding -= new SessionEndingCancelEventHandler(this.Current_SessionEnding);
                return(null);
            }), null);
            ICommandService commandService = this.services.GetService <ICommandService>();
            IProjectManager projectManager = this.services.GetService <IProjectManager>();

            projectManager.CloseSolution();
            ProjectManager projectManager1 = (ProjectManager)projectManager;

            projectManager1.UpdateConfiguration();
            commandService.RemoveTarget(projectManager1);
            IDocumentTypeManager documentTypeManager = this.services.GetService <IDocumentTypeManager>();

            documentTypeManager.Unregister(this.assemblyDocumentType);
            documentTypeManager.Unregister(this.projectReferenceDocumentType);
            documentTypeManager.Unregister(this.folderDocumentType);
            documentTypeManager.Unregister(this.comReferenceDocumentType);
            documentTypeManager.Unregister(this.cursorDocumentType);
            documentTypeManager.Unregister(this.deepZoomDocumentType);
            IProjectTypeManager projectTypeManager = this.services.GetService <IProjectTypeManager>();

            projectTypeManager.Unregister(this.websiteProjectType);
            projectTypeManager.Unregister(this.webApplicationProjectType);
            this.services.GetService <IOptionsDialogService>().OptionsPages.Remove(this.projectSystemOptionsPage);
            this.assemblyLoggingService.Unload();
            this.services.RemoveService(typeof(IAssemblyLoggingService));
            this.services.RemoveService(typeof(IProjectTypeManager));
            this.services.RemoveService(typeof(IDocumentTypeManager));
            this.services.RemoveService(typeof(IProjectManager));
            this.services.RemoveService(typeof(ISolutionService));
            this.services.AssemblyService().UnregisterLibraryResolver(this.blendSdkAssemblyResolver);
            this.services.AssemblyService().UnregisterLibraryResolver(this.blendAssemblyResolver);
            this.services.RemoveService(typeof(IAssemblyService));
            this.services.RemoveService(typeof(ISatelliteAssemblyResolver));
            this.assemblyService.Dispose();
        }
Esempio n. 3
0
        public void Unload()
        {
            this.services.RemoveService(typeof(ITextEditorService));
            this.services.RemoveService(typeof(ITextBufferService));
            this.services.RemoveService(typeof(ICodeModelService));
            this.services.RemoveService(typeof(ICodeProjectService));
            if (this.editingService != null)
            {
                this.editingService.Dispose();
                this.editingService = (EditingService)null;
            }
            if (this.commandTarget != null)
            {
                this.services.GetService <ICommandService>().RemoveTarget((ICommandTarget)this.commandTarget);
                this.commandTarget = (CommandTarget)null;
            }
            IDocumentTypeManager service = this.services.GetService <IDocumentTypeManager>();

            service.Unregister(this.csharpDocumentType);
            service.Unregister(this.visualBasicDocumentType);
            service.Unregister(this.javascriptDocumentType);
            service.Unregister(this.fSharpDocumentType);
            service.Unregister(this.fSharpScriptDocumentType);
            service.Unregister(this.fSharpTemplateDocumentType);
            service.Unregister(this.cPlusPlusDocumentType);
            service.Unregister(this.headerDocumentType);
            service.Unregister(this.htmlDocumentType);
            service.Unregister(this.xmlDocumentType);
            service.Unregister(this.limitedXamlDocumentType);
            service.Unregister(this.fxgDocumentType);
            this.services.GetService <IOptionsDialogService>().OptionsPages.Remove(this.codeOptionsPage);
        }