2 implementations of GetService
Microsoft.CodeAnalysis.Workspaces (2)
Workspace\Solution\DefaultTextDocumentServiceProvider.cs (1)
20public TService GetService<TService>() where TService : class, IDocumentService
Workspace\Solution\SourceGeneratedDocumentState.cs (1)
274public TService? GetService<TService>()
10 references to GetService
Microsoft.CodeAnalysis.Workspaces (10)
Diagnostics\DiagnosticData.cs (1)
236var documentPropertiesService = document.DocumentServiceProvider.GetService<DocumentPropertiesService>();
Rename\Renamer.cs (1)
107if (document.DocumentServiceProvider.GetService<ISpanMappingService>() != null)
src\roslyn\src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\AddImport\AddImportPlacementOptionsProviders.cs (1)
21=> document.DocumentServiceProvider.GetService<Host.ISpanMappingService>()?.SupportsMappingImportDirectives == true;
Workspace\Host\DocumentService\DocumentExcerptHelper.cs (2)
23return document.DocumentServiceProvider.GetService<IDocumentExcerptService>() is not null; 34var excerptService = document.DocumentServiceProvider.GetService<IDocumentExcerptService>();
Workspace\Host\DocumentService\Extensions.cs (3)
17=> document?.DocumentServiceProvider.GetService<IDocumentOperationService>()?.CanApplyChange ?? false; 23=> document?.DocumentServiceProvider.GetService<IDocumentOperationService>()?.SupportDiagnostics ?? false; 29=> documentState.DocumentServiceProvider.GetService<DocumentPropertiesService>()?.DiagnosticsLspClientName == RazorCSharpLspClientName;
Workspace\Host\DocumentService\SpanMappingHelper.cs (2)
22return document.DocumentServiceProvider.GetService<ISpanMappingService>() is not null; 41var spanMappingService = document.DocumentServiceProvider.GetService<ISpanMappingService>();