58 references to GetService
IdeBenchmarks (1)
RegexClassifierBenchmarks.cs (1)
84var extensionManager = document.Project.Solution.Services.GetService<IExtensionManager>();
Microsoft.CodeAnalysis.CSharp.EditorFeatures (1)
StringCopyPaste\StringCopyPasteCommandHandler_CutCopy.cs (1)
58var copyPasteService = document.Project.Solution.Services.GetService<IStringCopyPasteService>();
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
CodeActions\PreviewExceptionTests.cs (1)
114extensionManager = document.Project.Solution.Services.GetService<IExtensionManager>() as EditorLayerExtensionManager.ExtensionManager;
Microsoft.CodeAnalysis.EditorFeatures (5)
ExtractMethod\ExtractMethodCommandHandler.cs (1)
197var notificationService = document.Project.Solution.Services.GetService<INotificationService>();
Formatting\FormatCommandHandler.Paste.cs (1)
69var formattingRuleService = services.GetService<IHostDependentFormattingRuleFactoryService>();
InlineRename\InlineRenameSession.OpenTextBufferManager.cs (2)
571var textDiffService = oldDocument.Project.Solution.Services.GetService<IDocumentTextDifferencingService>(); 589var textDiffService = preMergeDocument.Project.Solution.Services.GetService<IDocumentTextDifferencingService>();
RenameTracking\RenameTrackingTaggerProvider.RenameTrackingCodeAction.cs (1)
99_document.Project.Solution.Services.GetService<INotificationService>()
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (2)
Diagnostics\GenerateType\GenerateTypeTestState.cs (1)
75return (TestProjectManagementService)InvocationDocument.Project.Solution.Services.GetService<IProjectManagementService>();
ExtractInterface\ExtractInterfaceTestState.cs (1)
70return (TestExtractInterfaceOptionsService)ExtractFromDocument.Project.Solution.Services.GetService<IExtractInterfaceOptionsService>();
Microsoft.CodeAnalysis.EditorFeatures.Wpf (1)
Peek\PeekableItemFactory.cs (1)
74var symbolNavigationService = solution.Services.GetService<ISymbolNavigationService>();
Microsoft.CodeAnalysis.Features (19)
AddImport\AbstractAddImportCodeFixProvider.cs (1)
65_packageInstallerService ?? services.GetService<IPackageInstallerService>() : null;
AddPackage\AbstractAddPackageCodeFixProvider.cs (2)
36if (workspaceServices.GetService<ISymbolSearchService>() is not { } symbolSearchService || 37workspaceServices.GetService<IPackageInstallerService>() is not { } installerService ||
CodeRefactorings\AddMissingImports\AbstractAddMissingImportsFeatureService.cs (1)
102var packageInstallerService = solution.Services.GetService<IPackageInstallerService>();
ExternalAccess\UnitTesting\API\NewUnitTestingIncrementalAnalyzerProvider.cs (2)
38var solutionCrawlerService = _services.GetService<IUnitTestingSolutionCrawlerService>(); 46var solutionCrawlerRegistrationService = services.GetService<IUnitTestingSolutionCrawlerRegistrationService>();
ExternalAccess\UnitTesting\LegacySolutionEvents\UnitTestingLegacySolutionEventsListener.cs (2)
32var service = solution.Services.GetService<IUnitTestingSolutionCrawlerRegistrationService>(); 41var service = services.GetService<IUnitTestingSolutionCrawlerRegistrationService>();
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingSolutionCrawlerService.cs (1)
33if (services.GetService<IUnitTestingSolutionCrawlerRegistrationService>() is UnitTestingSolutionCrawlerRegistrationService registration)
ExtractClass\AbstractExtractClassRefactoringProvider.cs (1)
36var optionsService = _optionsService ?? solution.Services.GetService<IExtractClassOptionsService>();
ExtractInterface\AbstractExtractInterfaceService.cs (2)
266var notificationService = document.Project.Solution.Services.GetService<INotificationService>(); 270var service = document.Project.Solution.Services.GetService<IExtractInterfaceOptionsService>();
FindUsages\FindUsagesHelpers.cs (1)
43var mappingService = document.Project.Solution.Services.GetService<ISymbolMappingService>();
GenerateOverrides\GenerateOverridesWithDialogCodeAction.cs (1)
42var globalOptionService = services.GetService<ILegacyGlobalOptionsWorkspaceService>();
GenerateType\AbstractGenerateTypeService.CodeAction.cs (2)
103var notificationService = _document.Project.Solution.Services.GetService<INotificationService>(); 104var projectManagementService = _document.Project.Solution.Services.GetService<IProjectManagementService>();
GoToDefinition\GoToDefinitionFeatureHelpers.cs (1)
90var provider = solution.Services.GetService<IExternalDefinitionItemProvider>();
MoveToNamespace\AbstractMoveToNamespaceCodeAction.cs (1)
69var symbolRenameCodeActionOperationFactory = moveToNamespaceResult.UpdatedSolution.Services.GetService<ISymbolRenamedCodeActionOperationFactoryWorkspaceService>();
src\Analyzers\Core\CodeFixes\NamingStyle\NamingStyleCodeFixProvider.cs (1)
165var factory = _startingSolution.Services.GetService<ISymbolRenamedCodeActionOperationFactoryWorkspaceService>();
Microsoft.CodeAnalysis.LanguageServer.Protocol (9)
Features\CodeFixes\CodeFixService.cs (3)
496var extensionManager = document.Project.Solution.Services.GetService<IExtensionManager>(); 871var extensionManager = services.GetService<IExtensionManager>(); 967var extensionManager = document.Project.Solution.Services.GetService<IExtensionManager>();
Features\Diagnostics\DocumentAnalysisExecutor.cs (1)
401var diagnosticSpanMappingService = textDocument.Project.Solution.Services.GetService<IWorkspaceVenusSpanMappingService>();
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.ProjectState.cs (1)
219&& project.Solution.Services.GetService<ISolutionCrawlerOptionsService>()?.EnableDiagnosticsInSourceGeneratedFiles == true)
Features\EditAndContinue\EditAndContinueDiagnosticSource_OpenDocument.cs (2)
32services.GetService<IEditAndContinueWorkspaceService>()?.SessionTracker is not { IsSessionActive: true } sessionStateTracker) 51var spanLocator = services.GetService<IActiveStatementSpanLocator>();
Handler\CodeActions\CodeActionResolveHelper.cs (1)
44var textDiffService = solution.Services.GetService<IDocumentTextDifferencingService>();
Handler\Diagnostics\DiagnosticSourceProviders\WorkspaceDocumentsAndProjectDiagnosticSourceProvider.cs (1)
59var enableDiagnosticsInSourceGeneratedFiles = solution.Services.GetService<ISolutionCrawlerOptionsService>()?.EnableDiagnosticsInSourceGeneratedFiles == true;
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Services\DiagnosticAnalyzer\DiagnosticComputer.cs (1)
106_performanceTracker = project.Solution.Services.GetService<IPerformanceTrackerService>();
Microsoft.CodeAnalysis.Remote.Workspaces (4)
ServiceHubRemoteHostClient.cs (4)
41services.GetService<IWorkspaceTelemetryService>()?.RegisterUnexpectedExceptionLogger(hubClient.Logger); 49_errorReportingService = services.GetService<IErrorReportingService>(); 50_shutdownCancellationService = services.GetService<IRemoteHostClientShutdownCancellationService>(); 130_services.GetService<IWorkspaceTelemetryService>()?.UnregisterUnexpectedExceptionLogger(_hubClient.Logger);
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (1)
LineCommit\CommitCommandHandler.vb (1)
243Dim formattingRuleService = document.Project.Solution.Services.GetService(Of IHostDependentFormattingRuleFactoryService)()
Microsoft.CodeAnalysis.Workspaces (9)
Diagnostics\DiagnosticData.cs (1)
176var diagnosticSpanMappingService = document?.Project.Solution.Services.GetService<IWorkspaceVenusSpanMappingService>();
FindSymbols\SymbolTree\SymbolTreeInfo_Source.cs (1)
89var serializer = projectState.LanguageServices.SolutionServices.GetService<ISerializerService>();
Remote\RemoteHostClient.cs (1)
46var service = services.GetService<IRemoteHostClientProvider>();
Workspace\Host\ISupportedChangesService.cs (1)
13/// Can be acquired from <see cref="Solution.Services"/>, with <see cref="SolutionServices.GetService{ISupportedChangesService}"/>.
Workspace\ProjectSystem\ProjectSystemProject.cs (1)
267var telemetryService = _projectSystemProjectFactory.SolutionServices.GetService<IWorkspaceTelemetryService>();
Workspace\ProjectSystem\ProjectSystemProjectOptionsProcessor.cs (1)
189_ruleSetFile = _workspaceServices.GetService<IRuleSetManager>()?.GetOrCreateRuleSet(effectiveRuleSetPath);
Workspace\Solution\Solution.cs (1)
1492if (this.Services.GetService<IWorkspacePartialSolutionsTestHook>()?.IsPartialSolutionDisabled == true)
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker_Generators.cs (1)
272var telemetryCollector = compilationState.SolutionState.Services.GetService<ISourceGeneratorTelemetryCollectorWorkspaceService>();
Workspace\Solution\SolutionCompilationState.SkeletonReferenceCache.cs (1)
237var logger = services.GetService<IWorkspaceTestLogger>();
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\MSBuildProjectLoader.Worker.cs (1)
508.GetService<TWorkspaceService>();
Microsoft.VisualStudio.LanguageServices (3)
CallHierarchy\CallHierarchyCommandHandler.cs (2)
95var mappingService = document.Project.Solution.Services.GetService<ISymbolMappingService>(); 115var notificationService = document.Project.Solution.Services.GetService<INotificationService>();
ChangeSignature\AddParameterDialogViewModel.cs (1)
28_notificationService = document.Project.Solution.Services.GetService<INotificationService>();