internal VisualStudioWorkspace(HostServices hostServices, WorkspaceBackgroundWork backgroundWork) : base(hostServices, WorkspaceKind.Host) { if ((backgroundWork & WorkspaceBackgroundWork.Compile) != 0) { _backgroundCompiler = new BackgroundCompiler(this); } if ((backgroundWork & WorkspaceBackgroundWork.Parse) != 0) { _backgroundParser = new BackgroundParser(this); _backgroundParser.Start(); } }
internal VisualStudioWorkspace(HostServices hostServices, WorkspaceBackgroundWork backgroundWork) : base(hostServices, WorkspaceKind.Host) { if ((backgroundWork & WorkspaceBackgroundWork.Compile) != 0) { _backgroundCompiler = new BackgroundCompiler(this); } if ((backgroundWork & WorkspaceBackgroundWork.Parse) != 0) { _backgroundParser = new BackgroundParser(this); _backgroundParser.Start(); } }
internal VisualStudioWorkspace(HostServices hostServices, WorkspaceBackgroundWork backgroundWork) : base(hostServices, WorkspaceKind.Host) { if ((backgroundWork & WorkspaceBackgroundWork.Compile) != 0) { _backgroundCompiler = new BackgroundCompiler(this); var cacheService = Services.GetService <IWorkspaceCacheService>(); if (cacheService != null) { cacheService.CacheFlushRequested += OnCacheFlushRequested; } } if ((backgroundWork & WorkspaceBackgroundWork.Parse) != 0) { _backgroundParser = new BackgroundParser(this); _backgroundParser.Start(); } }
internal VisualStudioWorkspace(HostServices hostServices, WorkspaceBackgroundWork backgroundWork) : base(hostServices, WorkspaceKind.Host) { if ((backgroundWork & WorkspaceBackgroundWork.Compile) != 0) { _backgroundCompiler = new BackgroundCompiler(this); var cacheService = Services.GetService<IWorkspaceCacheService>(); if (cacheService != null) { cacheService.CacheFlushRequested += OnCacheFlushRequested; } } if ((backgroundWork & WorkspaceBackgroundWork.Parse) != 0) { _backgroundParser = new BackgroundParser(this); _backgroundParser.Start(); } }
public VisualStudioWorkspaceImpl( SVsServiceProvider serviceProvider, WorkspaceBackgroundWork backgroundWork) : base( CreateHostServices(serviceProvider), backgroundWork) { this.ServiceProvider = serviceProvider; _textManager = serviceProvider.GetService(typeof(SVsTextManager)) as IVsTextManager; _shellOpenDocument = serviceProvider.GetService(typeof(SVsUIShellOpenDocument)) as IVsUIShellOpenDocument; // Ensure the options factory services are initialized on the UI thread this.Services.GetService <IOptionService>(); var session = serviceProvider.GetService(typeof(SVsLog)) as IVsSqmMulti; var profileService = serviceProvider.GetService(typeof(SVsFeedbackProfile)) as IVsFeedbackProfile; // We have Watson hits where this came back null, so guard against it if (profileService != null) { Sqm.LogSession(session, profileService.IsMicrosoftInternal); } }
public static bool IsValid(this WorkspaceBackgroundWork work) { return(work >= WorkspaceBackgroundWork.None && work <= WorkspaceBackgroundWork.ParseAndCompile); }