public Analyzer(IForegroundNotificationService notificationService, IAsynchronousOperationListener listener, VisualStudioWorkspace workspace, ProjectCodeModelFactory projectCodeModelFactory) { _notificationService = notificationService; _listener = listener; _workspace = workspace; _projectCodeModelFactory = projectCodeModelFactory; }
public ProjectCodeModel(IThreadingContext threadingContext, ProjectId projectId, ICodeModelInstanceFactory codeModelInstanceFactory, VisualStudioWorkspace visualStudioWorkspace, IServiceProvider serviceProvider, ProjectCodeModelFactory projectCodeModelFactory) { _threadingContext = threadingContext; _projectId = projectId; _codeModelInstanceFactory = codeModelInstanceFactory; _visualStudioWorkspace = visualStudioWorkspace; _serviceProvider = serviceProvider; _projectCodeModelFactory = projectCodeModelFactory; }
public CodeModelIncrementalAnalyzerProvider( IForegroundNotificationService notificationService, IAsynchronousOperationListenerProvider listenerProvider, ProjectCodeModelFactory projectCodeModelFactory) { _listener = listenerProvider.GetListener(FeatureAttribute.CodeModel); _notificationService = notificationService; _projectCodeModelFactory = projectCodeModelFactory; }
internal CodeModelProjectCache( IThreadingContext threadingContext, ProjectId projectId, ICodeModelInstanceFactory codeModelInstanceFactory, ProjectCodeModelFactory projectFactory, IServiceProvider serviceProvider, HostLanguageServices languageServices, VisualStudioWorkspace workspace) { State = new CodeModelState(threadingContext, serviceProvider, languageServices, workspace, projectFactory); _projectId = projectId; _codeModelInstanceFactory = codeModelInstanceFactory; }
public NodeKeyValidation(ProjectCodeModelFactory projectCodeModelFactory) { foreach (var projectCodeModel in projectCodeModelFactory.GetAllProjectCodeModels()) { var fcms = projectCodeModel.GetCachedFileCodeModelInstances(); foreach (var fcm in fcms) { var globalNodeKeys = fcm.Object.GetCurrentNodeKeys(); _nodeKeysMap.Add(fcm, globalNodeKeys); } } }
public CodeModelState( IThreadingContext threadingContext, IServiceProvider serviceProvider, HostLanguageServices languageServices, VisualStudioWorkspace workspace, ProjectCodeModelFactory projectCodeModelFactory) { Debug.Assert(threadingContext != null); Debug.Assert(serviceProvider != null); Debug.Assert(languageServices != null); Debug.Assert(workspace != null); this.ThreadingContext = threadingContext; this.ServiceProvider = serviceProvider; this.CodeModelService = languageServices.GetService <ICodeModelService>(); this.SyntaxFactsService = languageServices.GetService <ISyntaxFactsService>(); this.CodeGenerator = languageServices.GetService <ICodeGenerationService>(); this.ProjectCodeModelFactory = projectCodeModelFactory; this.Workspace = workspace; }
public CodeModelState( IThreadingContext threadingContext, IServiceProvider serviceProvider, HostLanguageServices languageServices, VisualStudioWorkspace workspace, ProjectCodeModelFactory projectCodeModelFactory) { Debug.Assert(threadingContext != null); Debug.Assert(serviceProvider != null); Debug.Assert(languageServices != null); Debug.Assert(workspace != null); // ⚠ This code runs on the main thread. Language services accessed here should be preloaded in // ProjectCodemodelFactory to avoid blocking MEF operations. this.ThreadingContext = threadingContext; this.ServiceProvider = serviceProvider; this.CodeModelService = languageServices.GetService <ICodeModelService>(); this.SyntaxFactsService = languageServices.GetService <ISyntaxFactsService>(); this.CodeGenerator = languageServices.GetService <ICodeGenerationService>(); this.ProjectCodeModelFactory = projectCodeModelFactory; this.Workspace = workspace; }