void Microsoft.Expression.Project.ISolutionManagement.ReactivateWatchers() { ((IFileWatcher)this).Reactivate(); if (this.Projects == null || this.Projects.CountIs <IProject>(0)) { return; } IProject[] array = this.Projects.ToArray <IProject>(); for (int i = 0; i < (int)array.Length; i++) { IFileWatcher fileWatcher = array[i] as IFileWatcher; if (fileWatcher != null) { fileWatcher.Reactivate(); } } if (!BuildManager.Building) { AssemblyService assemblyService = (AssemblyService)this.serviceProvider.AssemblyService(); if (assemblyService == null) { return; } List <string> strs = assemblyService.UpdateCacheWithExternalChanges(); if (strs.Count > 0) { foreach (MSBuildBasedProject mSBuildBasedProject in this.Projects.OfType <MSBuildBasedProject>()) { mSBuildBasedProject.UpdateAssemblyReferences(strs); } } } }
public void Load(IServices services) { this.services = services; ICommandService service = (ICommandService)this.services.GetService(typeof(ICommandService)); IExpressionMefHostingService expressionMefHostingService = this.services.GetService <IExpressionMefHostingService>(); IDocumentTypeManager documentTypeManager = new DocumentTypeManager(new UnknownDocumentType()); this.services.AddService(typeof(IDocumentTypeManager), documentTypeManager); IProjectTypeManager projectTypeManager = new ProjectTypeManager(); this.services.AddService(typeof(IProjectTypeManager), projectTypeManager); IConfigurationService configurationService = this.services.GetService <IConfigurationService>(); ProjectManager projectManager = new ProjectManager(this.services, configurationService["ProjectManager"]); this.services.AddService(typeof(IProjectManager), projectManager); service.AddTarget(projectManager); this.services.AddService(typeof(IExternalChanges), projectManager); this.solutionService = new SolutionService(projectManager); this.services.AddService(typeof(ISolutionService), this.solutionService); this.assemblyLoggingService = new AssemblyLoggingService(configurationService.ConfigurationDirectoryPath); this.services.AddService(typeof(IAssemblyLoggingService), this.assemblyLoggingService); IProjectAdapterService projectAdapterService = new ProjectAdapterService(this.services); this.services.AddService(typeof(IProjectAdapterService), projectAdapterService); if (expressionMefHostingService != null) { expressionMefHostingService.AddInternalPart(projectAdapterService); expressionMefHostingService.AddInternalPart(this.solutionService); } IOptionsDialogService optionsDialogService = this.services.GetService <IOptionsDialogService>(); this.projectSystemOptionsPage = new ProjectSystemOptionsPage(projectManager, this.assemblyLoggingService); optionsDialogService.OptionsPages.Add(this.projectSystemOptionsPage); this.assemblyDocumentType = new AssemblyDocumentType(); documentTypeManager.Register(this.assemblyDocumentType); this.projectReferenceDocumentType = new ProjectReferenceDocumentType(); documentTypeManager.Register(this.projectReferenceDocumentType); this.folderDocumentType = new FolderDocumentType(); documentTypeManager.Register(this.folderDocumentType); this.comReferenceDocumentType = new ComReferenceDocumentType(); documentTypeManager.Register(this.comReferenceDocumentType); this.cursorDocumentType = new CursorDocumentType(); documentTypeManager.Register(this.cursorDocumentType); this.deepZoomDocumentType = new DeepZoomDocumentType(); documentTypeManager.Register(this.deepZoomDocumentType); this.websiteProjectType = new WebsiteProjectType(); projectTypeManager.Register(this.websiteProjectType); this.webApplicationProjectType = new WebApplicationProjectType(); projectTypeManager.Register(this.webApplicationProjectType); this.assemblyService = new AssemblyService(this.services); this.services.AddService(typeof(IAssemblyService), this.assemblyService); this.services.AddService(typeof(ISatelliteAssemblyResolver), this.assemblyService); this.blendSdkAssemblyResolver = new BlendSdkAssemblyResolver(); this.assemblyService.RegisterLibraryResolver(this.blendSdkAssemblyResolver); this.blendAssemblyResolver = new BlendAssemblyResolver(); this.assemblyService.RegisterLibraryResolver(this.blendAssemblyResolver); Microsoft.Expression.Framework.UserInterface.IWindowService windowService = this.services.GetService <Microsoft.Expression.Framework.UserInterface.IWindowService>(); windowService.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); UIThreadDispatcher.Instance.BeginInvoke(DispatcherPriority.SystemIdle, new Action(this.assemblyService.AssemblyCache.Clean)); }