74 references to GetService
IdeCoreBenchmarks (1)
NavigateToBenchmarks.cs (1)
216var searchTasks = solution.Projects.GroupBy(p => p.Services.GetService<INavigateToSearchService>()).Select(
Microsoft.CodeAnalysis.CodeStyle.Fixes (2)
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.CodeAction.cs (1)
67var syntaxFactory = _document.Project.Solution.Services.GetLanguageServices(_state.TypeToGenerateIn.Language).GetService<SyntaxGenerator>();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\SimplifierOptionsProviders.cs (1)
15=> languageServices.GetService<ISimplificationService>()?.GetSimplifierOptions(options) ?? SimplifierOptions.CommonDefaults;
Microsoft.CodeAnalysis.CSharp.Features (1)
Completion\CompletionProviders\SnippetCompletionProvider.cs (1)
169var service = services.GetLanguageServices(semanticModel.Language).GetService<ISnippetInfoService>();
Microsoft.CodeAnalysis.EditorFeatures (4)
Classification\Syntactic\SyntacticClassificationTaggerProvider.TagComputer.cs (1)
149if (solutionServices.GetProjectServices(contentType)?.GetService<IClassificationService>() is not { } classificationService)
InlineRename\InlineRenameSession.OpenTextBufferManager.cs (1)
590var contentType = preMergeDocument.Project.Services.GetService<IContentTypeLanguageService>().GetDefaultContentType();
IntelliSense\AsyncCompletion\CompletionSource.cs (1)
181var syntaxFacts = services.GetService<ISyntaxFactsService>();
TextDiffing\EditorTextDifferencingService.cs (1)
35var diffService = _differenceSelectorService.GetTextDifferencingService(oldDocument.Project.Services.GetService<IContentTypeLanguageService>().GetDefaultContentType())
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
CodeGeneration\CodeGenerationTests.cs (1)
868this.Service = Document.Project.Services.GetService<ICodeGenerationService>();
Microsoft.CodeAnalysis.EditorFeatures.Wpf (1)
QuickInfo\Extensions.cs (1)
36var contentTypeService = document.Project.Services.GetService<IContentTypeLanguageService>();
Microsoft.CodeAnalysis.ExternalAccess.FSharp (5)
Internal\Diagnostics\FSharpDocumentDiagnosticAnalyzer.cs (2)
75var analyzer = document.Project.Services.GetService<FSharpDocumentDiagnosticAnalyzerService>(); 86var analyzer = document.Project.Services.GetService<FSharpDocumentDiagnosticAnalyzerService>();
Internal\Diagnostics\FSharpSimplifyNameDiagnosticAnalyzer.cs (1)
59var analyzer = document.Project.Services.GetService<FSharpSimplifyNameDiagnosticAnalyzerService>();
Internal\Diagnostics\FSharpUnusedDeclarationsAnalyzer.cs (1)
61var analyzer = document.Project.Services.GetService<FSharpUnusedDeclarationsDiagnosticAnalyzerService>();
Internal\Diagnostics\FSharpUnusedOpensDiagnosticAnalyzer.cs (1)
54var analyzer = document.Project.Services.GetService<FSharpUnusedOpensDiagnosticAnalyzerService>();
Microsoft.CodeAnalysis.ExternalAccess.Xaml (2)
Internal\DescriptionService.cs (2)
41var formatter = project.Services.GetService<IDocumentationCommentFormattingService>(); 47var symbolDisplayService = project.Services.GetService<ISymbolDisplayService>();
Microsoft.CodeAnalysis.Features (9)
Completion\CommonCompletionProvider.cs (1)
79var snippetService = document.Project.Services.GetService<ISnippetInfoService>();
Completion\Providers\AbstractAggregateEmbeddedLanguageCompletionProvider.cs (1)
64var languagesProvider = languageServices?.GetService<IEmbeddedLanguagesProvider>();
EditAndContinue\Utilities\Extensions.cs (1)
51if (project.Services.GetService<IEditAndContinueAnalyzer>() == null)
ExternalAccess\UnitTesting\SolutionCrawler\AbstractUnitTestingDocumentDifferenceService.cs (1)
21var syntaxFactsService = newDocument.Project.Services.GetService<ISyntaxFactsService>();
GenerateType\AbstractGenerateTypeService.Editor.cs (1)
137_targetLanguageService = _generateTypeOptionsResult.Project.Services.GetService<IGenerateTypeService>();
SolutionCrawler\AbstractDocumentDifferenceService.cs (1)
22var syntaxFactsService = newDocument.Project.Services.GetService<ISyntaxFactsService>();
src\Analyzers\Core\CodeFixes\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.CodeAction.cs (1)
67var syntaxFactory = _document.Project.Solution.Services.GetLanguageServices(_state.TypeToGenerateIn.Language).GetService<SyntaxGenerator>();
Workspace\MiscellaneousFileUtilities.cs (2)
31var compilationOptions = languageServices.GetService<ICompilationFactoryService>()?.GetDefaultCompilationOptions(); 35var parseOptions = languageServices.GetService<ISyntaxTreeFactoryService>()?.GetDefaultParseOptionsWithLatestLanguageVersion();
Microsoft.CodeAnalysis.VisualBasic.Features (4)
CodeFixes\GenerateEvent\GenerateEventCodeFixProvider.vb (4)
127Dim codeGenService = document.Project.Solution.Services.GetLanguageServices(targetType.Language).GetService(Of ICodeGenerationService) 128Dim syntaxFactService = document.Project.Solution.Services.GetLanguageServices(targetType.Language).GetService(Of ISyntaxFactsService) 269Dim codeGenService = document.Project.Solution.Services.GetLanguageServices(targetType.Language).GetService(Of ICodeGenerationService) 379Dim codeGenService = document.Project.Solution.Services.GetLanguageServices(originalTargetType.Language).GetService(Of ICodeGenerationService)
Microsoft.CodeAnalysis.Workspaces (13)
Classification\AbstractClassificationService.cs (1)
234var classificationService = services.GetLanguageServices(oldRoot.Language).GetService<ISyntaxClassificationService>();
Classification\Classifier.cs (1)
98&& projectServices.GetService<IEmbeddedLanguageClassificationService>() is { } embeddedLanguageService)
Formatting\Formatter.cs (1)
38=> languageServices.GetService<ISyntaxFormattingService>()?.GetDefaultFormattingRules() ?? [];
Rename\ConflictEngine\ConflictResolver.Session.cs (1)
717solution.Services.GetLanguageServices(language).GetService<IRenameRewriterLanguageService>()
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (1)
337var syntaxFactsLanguageService = solution.Services.GetLanguageServices(documentsGroupedByLanguage.Key).GetService<ISyntaxFactsService>();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
22=> project?.Services.GetService<TLanguageService>();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\SimplifierOptionsProviders.cs (1)
15=> languageServices.GetService<ISimplificationService>()?.GetSimplifierOptions(options) ?? SimplifierOptions.CommonDefaults;
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (2)
613if (projectWithMetadataReference.LanguageServices.GetService<ICompilationFactoryService>() != null && 614referencedProject.LanguageServices.GetService<ICompilationFactoryService>() == null)
Workspace\Solution\DocumentState.cs (1)
68if (languageServices.GetService<ISyntaxTreeFactoryService>() == null)
Workspace\Solution\Project.cs (1)
95public bool SupportsCompilation => this.Services.GetService<ICompilationFactoryService>() != null;
Workspace\Solution\ProjectState.cs (2)
179var compilationFactory = LanguageServices.GetService<ICompilationFactoryService>(); 188var syntaxTreeFactory = LanguageServices.GetService<ISyntaxTreeFactoryService>();
Microsoft.CodeAnalysis.Workspaces.MSBuild (2)
MSBuild\MSBuildProjectLoader.Worker.cs (1)
503.GetService<TLanguageService>();
MSBuild\ProjectFileExtensionRegistry.cs (1)
63_solutionServices.GetLanguageServices(language).GetService<ICommandLineParserService>() is not null)
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
SolutionTests\SolutionTests.cs (1)
4550var factory = dummyProject.Services.GetService<ISyntaxTreeFactoryService>();
Microsoft.VisualStudio.LanguageServices (8)
Implementation\AbstractVsTextViewFilter.cs (1)
116var languageDebugInfo = document.Project.Services.GetService<ILanguageDebugInfoService>();
Library\ObjectBrowser\AbstractDescriptionBuilder.cs (1)
294var formattingService = _project.Services.GetService<IDocumentationCommentFormattingService>();
Library\ObjectBrowser\ObjectList.cs (1)
687var helpContextService = project.Services.GetService<IHelpContextService>();
Preview\FileChange.cs (1)
86left.Project.Services.GetService<IContentTypeLanguageService>().GetDefaultContentType());
Progression\GraphBuilder.cs (1)
343var progressionLanguageService = solution.Services.GetLanguageServices(symbol.Language).GetService<IProgressionLanguageService>();
Venus\ContainedLanguage.IVsContainedLanguageCodeSupport.cs (1)
77additionalFormattingRule: targetDocument.Project.Services.GetService<IAdditionalFormattingRuleLanguageService>().GetAdditionalCodeGenerationRule(),
Venus\ContainedLanguageCodeSupport.cs (1)
269var codeModel = thisDocument.Project.Services.GetService<ICodeModelNavigationPointService>();
Workspace\VisualStudioSymbolNavigationService.cs (1)
100var libraryService = project.Services.GetService<ILibraryService>();
Microsoft.VisualStudio.LanguageServices.UnitTests (8)
ChangeSignature\ChangeSignatureViewModelTests.vb (1)
467Dim token = Await tree.GetTouchingWordAsync(doc.CursorPosition.Value, workspaceDoc.Project.Services.GetService(Of ISyntaxFactsService)(), CancellationToken.None)
CommonControls\MemberSelectionViewModelTests.vb (1)
183Dim token = Await tree.GetTouchingWordAsync(doc.CursorPosition.Value, workspaceDoc.Project.Services.GetService(Of ISyntaxFactsService)(), CancellationToken.None)
CommonControls\NewTypeDestinationSelectionViewModelTests.vb (1)
236Dim token = Await tree.GetTouchingWordAsync(doc.CursorPosition.Value, workspaceDoc.Project.Services.GetService(Of ISyntaxFactsService)(), CancellationToken.None)
ExtractInterface\ExtractInterfaceViewModelTests.vb (2)
299Dim token = Await tree.GetTouchingWordAsync(doc.CursorPosition.Value, workspaceDoc.Project.Services.GetService(Of ISyntaxFactsService)(), CancellationToken.None) 308workspaceDoc.Project.Services.GetService(Of ISyntaxFactsService)(),
MoveStaticMembers\MoveStaticMembersViewModelTest.vb (1)
33Dim syntaxFacts = workspaceDoc.Project.Services.GetService(Of ISyntaxFactsService)()
PullMemberUp\PullMemberUpViewModelTest.vb (1)
255Dim token = Await tree.GetTouchingWordAsync(doc.CursorPosition.Value, workspaceDoc.Project.Services.GetService(Of ISyntaxFactsService)(), CancellationToken.None)
RQName\RQNameTests.vb (1)
247Dim token = Await tree.GetTouchingWordAsync(doc.CursorPosition.Value, workspaceDoc.Project.Services.GetService(Of ISyntaxFactsService)(), CancellationToken.None)
Microsoft.VisualStudio.LanguageServices.VisualBasic (2)
Venus\ContainedLanguageStaticEventBinding.vb (2)
80Dim codeModel = targetDocument.Project.Services.GetService(Of ICodeModelService)() 108Dim codeModel = targetDocument.Project.Services.GetService(Of ICodeModelService)()
Microsoft.VisualStudio.LanguageServices.Xaml (10)
Implementation\LanguageServer\Extensions\SymbolExtensions.cs (2)
29var formatter = codeProject.Services.GetService<IDocumentationCommentFormattingService>(); 35var symbolDisplayService = codeProject.Services.GetService<ISymbolDisplayService>();
Implementation\LanguageServer\Handler\Commands\CreateEventCommandHandler.cs (1)
54var commandService = document.Project.Services.GetService<IXamlCommandService>();
Implementation\LanguageServer\Handler\Definitions\GoToDefinitionHandler.cs (1)
63var xamlGoToDefinitionService = document.Project.Services.GetService<IXamlGoToDefinitionService>();
Implementation\LanguageServer\Handler\FoldingRanges\FoldingRangesHandler.cs (1)
42var xamlStructureService = document.Project.Services.GetService<IXamlStructureService>();
Implementation\LanguageServer\Handler\Formatting\AbstractFormatDocumentHandlerBase.cs (1)
31var formattingService = document?.Project.Services.GetService<IXamlFormattingService>();
Implementation\LanguageServer\Handler\Formatting\FormatDocumentOnTypeHandler.cs (1)
43var formattingService = document?.Project.Services.GetService<IXamlFormattingService>();
Implementation\LanguageServer\Handler\Hover\HoverHandler.cs (1)
53var quickInfoService = document.Project.Services.GetService<IXamlQuickInfoService>();
Implementation\LanguageServer\Handler\OnAutoInsert\OnAutoInsertHandler.cs (1)
41var insertService = document.Project.Services.GetService<IXamlAutoInsertService>();
Implementation\LanguageServer\Handler\OnTypeRename\OnTypeRenameHandler.cs (1)
73var renameService = document.Project.Services.GetService<IXamlTypeRenameService>();