56 references to GetService
Microsoft.CodeAnalysis.Features (35)
AddImport\AbstractAddImportCodeFixProvider.cs (1)
64
_packageInstallerService ?? services.
GetService
<IPackageInstallerService>() : null;
AddPackage\AbstractAddPackageCodeFixProvider.cs (2)
37
if (workspaceServices.
GetService
<ISymbolSearchService>() is not { } symbolSearchService ||
38
workspaceServices.
GetService
<IPackageInstallerService>() is not { } installerService ||
AddPackage\ParentInstallPackageCodeAction.cs (1)
71
installerService ??= document.Project.Solution.Services.
GetService
<IPackageInstallerService>();
CodeFixes\Service\CodeFixService.cs (3)
498
var extensionManager = solution.Services.
GetService
<IExtensionManager>();
907
var extensionManager = services.
GetService
<IExtensionManager>();
1003
var extensionManager = document.Project.Solution.Services.
GetService
<IExtensionManager>();
CodeRefactorings\AddMissingImports\AbstractAddMissingImportsFeatureService.cs (1)
80
var packageInstallerService = solution.Services.
GetService
<IPackageInstallerService>();
CodeRefactorings\ExtractMethod\AbstractExtractMethodCodeRefactoringProvider.cs (1)
40
var activeInlineRenameSession = solution.Services.
GetService
<ICodeRefactoringHelpersService>().ActiveInlineRenameSession;
Diagnostics\Service\DiagnosticAnalyzerService_CoreAnalyze.cs (1)
92
var service = project.Solution.Services.
GetService
<IPerformanceTrackerService>();
Diagnostics\Service\DocumentAnalysisExecutor.cs (1)
362
var diagnosticSpanMappingService = textDocument.Project.Solution.Services.
GetService
<IWorkspaceVenusSpanMappingService>();
Extensions\ExtensionFolder.cs (1)
76
var factory = _extensionMessageHandlerService._solutionServices.
GetService
<IExtensionMessageHandlerFactory>();
ExternalAccess\UnitTesting\API\NewUnitTestingIncrementalAnalyzerProvider.cs (2)
37
var solutionCrawlerService = _services.
GetService
<IUnitTestingSolutionCrawlerService>();
45
var solutionCrawlerRegistrationService = services.
GetService
<IUnitTestingSolutionCrawlerRegistrationService>();
ExternalAccess\UnitTesting\LegacySolutionEvents\UnitTestingLegacySolutionEventsListener.cs (2)
32
var service = solution.Services.
GetService
<IUnitTestingSolutionCrawlerRegistrationService>();
41
var service = services.
GetService
<IUnitTestingSolutionCrawlerRegistrationService>();
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingSolutionCrawlerService.cs (1)
33
if (services.
GetService
<IUnitTestingSolutionCrawlerRegistrationService>() is UnitTestingSolutionCrawlerRegistrationService registration)
ExtractClass\AbstractExtractClassRefactoringProvider.cs (1)
31
var optionsService = _optionsService ?? solution.Services.
GetService
<IExtractClassOptionsService>();
ExtractClass\ExtractClassWithDialogCodeAction.cs (1)
56
=> _service is not null || _document.Project.Solution.Services.
GetService
<IExtractClassOptionsService>() is not null;
ExtractInterface\AbstractExtractInterfaceService.cs (1)
278
=> document.Project.Solution.Services.
GetService
<IExtractInterfaceOptionsService>() is not null;
FindUsages\FindUsagesHelpers.cs (1)
59
var mappingService = document.Project.Solution.Services.
GetService
<ISymbolMappingService>();
GenerateConstructors\AbstractGenerateConstructorsCodeRefactoringProvider.cs (1)
247
var globalOptions = document.Project.Solution.Services.
GetService
<ILegacyGlobalOptionsWorkspaceService>();
GenerateConstructors\AbstractGenerateConstructorsCodeRefactoringProvider.GenerateConstructorWithDialogCodeAction.cs (1)
43
=> (_service._pickMembersService_forTesting ?? _document.Project.Solution.Services.
GetService
<IPickMembersService>()) is not null;
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersCodeRefactoringProvider.cs (1)
111
var globalOptions = document.Project.Solution.Services.
GetService
<ILegacyGlobalOptionsWorkspaceService>();
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndHashWithDialogCodeAction.cs (1)
44
=> (_service._pickMembersService_forTestingPurposes ?? _document.Project.Solution.Services.
GetService
<IPickMembersService>()) is not null;
GenerateOverrides\GenerateOverridesWithDialogCodeAction.cs (2)
39
=> (_service._pickMembersService_forTestingPurposes ?? _document.Project.Solution.Services.
GetService
<IPickMembersService>()) is not null;
45
var globalOptionService = services.
GetService
<ILegacyGlobalOptionsWorkspaceService>();
GenerateType\AbstractGenerateTypeService.CodeAction.cs (2)
102
var notificationService = _document.Project.Solution.Services.
GetService
<INotificationService>();
103
var projectManagementService = _document.Project.Solution.Services.
GetService
<IProjectManagementService>();
GoToDefinition\GoToDefinitionFeatureHelpers.cs (1)
88
var provider = solution.Services.
GetService
<IExternalDefinitionItemProvider>();
MoveStaticMembers\AbstractMoveStaticMembersRefactoringProvider.cs (1)
24
var service = document.Project.Solution.Services.
GetService
<IMoveStaticMembersOptionsService>();
MoveToNamespace\MoveToNamespaceCodeAction.cs (1)
67
var symbolRenameCodeActionOperationFactory = moveToNamespaceResult.UpdatedSolution.Services.
GetService
<ISymbolRenamedCodeActionOperationFactoryWorkspaceService>();
NavigateTo\INavigateToSearcherHost.cs (1)
57
var workspaceService = _solution.Services.
GetService
<IWorkspaceNavigateToSearcherHostService>();
PullMemberUp\AbstractPullMemberUpRefactoringProvider.cs (1)
30
_service ??= document.Project.Solution.Services.
GetService
<IPullMemberUpOptionsService>();
src\roslyn\src\Analyzers\Core\CodeFixes\NamingStyle\NamingStyleCodeFixProvider.cs (1)
165
var factory = _startingSolution.Services.
GetService
<ISymbolRenamedCodeActionOperationFactoryWorkspaceService>();
Microsoft.CodeAnalysis.Workspaces (20)
Diagnostics\DiagnosticData.cs (1)
183
var diagnosticSpanMappingService = document?.Project.Solution.Services.
GetService
<IWorkspaceVenusSpanMappingService>();
FindSymbols\SymbolTree\SymbolTreeInfo_Source.cs (1)
90
var serializer = projectState.LanguageServices.SolutionServices.
GetService
<ISerializerService>();
Remote\RemoteHostClient.cs (1)
46
var service = services.
GetService
<IRemoteHostClientProvider>();
Rename\Renamer.cs (1)
142
allowRenamesInRazorSourceGeneratedDocuments: solution.Services.
GetService
<ISourceGeneratedDocumentSpanMappingService>() is not null,
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (1)
458
return document.Project.Solution.Services.
GetService
<ISourceGeneratedDocumentSpanMappingService>() is { } mappingService
Serialization\SerializerService.cs (1)
45
private readonly IDocumentationProviderService? _documentationService = workspaceServices.
GetService
<IDocumentationProviderService>();
Workspace\Host\DocumentService\DocumentExcerptHelper.cs (2)
18
document.Project.Solution.Services.
GetService
<ISourceGeneratedDocumentExcerptService>() is { } sourceGeneratedExcerptService)
29
document.Project.Solution.Services.
GetService
<ISourceGeneratedDocumentExcerptService>() is { } sourceGeneratedExcerptService)
Workspace\Host\DocumentService\SpanMappingHelper.cs (2)
17
document.Project.Solution.Services.
GetService
<ISourceGeneratedDocumentSpanMappingService>() is { } sourceGeneratedSpanMappingService)
28
document.Project.Solution.Services.
GetService
<ISourceGeneratedDocumentSpanMappingService>() is { } sourceGeneratedSpanMappingService)
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)
258
var telemetryService = _projectSystemProjectFactory.SolutionServices.
GetService
<IWorkspaceTelemetryService>();
Workspace\ProjectSystem\ProjectSystemProjectOptionsProcessor.cs (1)
161
_ruleSetFile = _workspaceServices.
GetService
<IRuleSetManager>()?.GetOrCreateRuleSet(effectiveRuleSetPath);
Workspace\Solution\ProjectState.cs (1)
517
private readonly ILegacyGlobalOptionsWorkspaceService? _globalOptions = services.
GetService
<ILegacyGlobalOptionsWorkspaceService>();
Workspace\Solution\Solution.cs (1)
1546
if (this.Services.
GetService
<IWorkspacePartialSolutionsTestHook>()?.IsPartialSolutionDisabled == true)
Workspace\Solution\SolutionCompilationState.cs (1)
1659
if (this.Services.
GetService
<IWorkspacePartialSolutionsTestHook>()?.IsPartialSolutionDisabled == true)
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker_Generators.cs (3)
143
solution.Services.
GetService
<ISourceGeneratorTelemetryReporterWorkspaceService>()?.QueueReportingOfTelemetry();
328
var telemetryCollector = compilationState.SolutionState.Services.
GetService
<ISourceGeneratorTelemetryCollectorWorkspaceService>();
333
var telemetryReporter = compilationState.SolutionState.Services.
GetService
<ISourceGeneratorTelemetryReporterWorkspaceService>();
Workspace\Solution\SolutionCompilationState.SkeletonReferenceCache.cs (1)
237
var logger = services.
GetService
<IWorkspaceTestLogger>();
Microsoft.CodeAnalysis.Workspaces.MSBuild (1)
MSBuild\MSBuildProjectLoader.Worker.cs (1)
412
.
GetService
<TWorkspaceService>();