97 references to GetRequiredService
Microsoft.CodeAnalysis.CodeStyle.Fixes (12)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\AddImport\AddImportPlacementOptionsProviders.cs (1)
25
=> languageServices.
GetRequiredService
<IAddImportsService>().GetAddImportOptions(options, allowInHiddenRegions ?? AddImportPlacementOptions.Default.AllowInHiddenRegions);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (1)
34
_symbolDeclarationService = languageServices.
GetRequiredService
<ISymbolDeclarationService>();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationOptionsProviders.cs (2)
19
=> languageServices.
GetRequiredService
<ICodeGenerationService>().GetCodeGenerationOptions(options);
51
=> languageServices.
GetRequiredService
<ICodeGenerationService>().DefaultOptions;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\AbstractRefactoringHelpersService.cs (3)
44
var syntaxFacts = document.LanguageServices.
GetRequiredService
<ISyntaxFactsService>();
45
var headerFacts = document.LanguageServices.
GetRequiredService
<IHeaderFactsService>();
163
var syntaxKinds = document.LanguageServices.
GetRequiredService
<ISyntaxKindsService>();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Formatting\SyntaxFormattingOptionsProviders.cs (2)
15
=> languageServices.
GetRequiredService
<ISyntaxFormattingService>().GetFormattingOptions(options);
27
=> languageServices.
GetRequiredService
<ISyntaxFormattingService>().DefaultOptions;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\IIndentationService.cs (2)
50
var syntaxGenerator = document.LanguageServices.
GetRequiredService
<SyntaxGeneratorInternal>();
58
var indenter = document.LanguageServices.
GetRequiredService
<IIndentationService>();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\SimplifierOptionsProviders.cs (1)
27
=> languageServices.
GetRequiredService
<ISimplificationService>().DefaultOptions;
Microsoft.CodeAnalysis.CSharp.Features (3)
SignatureHelp\InvocationExpressionSignatureHelpProvider.cs (1)
154
var structuralTypeDisplayService = document.Project.Services.
GetRequiredService
<IStructuralTypeDisplayService>();
SignatureHelp\ObjectCreationExpressionSignatureHelpProvider.cs (2)
97
var structuralTypeDisplayService = document.Project.Services.
GetRequiredService
<IStructuralTypeDisplayService>();
127
var structuralTypeDisplayService = document.Project.Services.
GetRequiredService
<IStructuralTypeDisplayService>();
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Formatting\CSharpSyntaxFormattingService.cs (1)
330
var service = _services.
GetRequiredService
<ISyntaxFormattingService>();
Microsoft.CodeAnalysis.EditorFeatures (3)
Organizing\OrganizeDocumentCommandHandler.cs (1)
63
var organizeImportsService = workspace.Services.SolutionServices.GetProjectServices(args.SubjectBuffer)!.
GetRequiredService
<IOrganizeImportsService>();
Preview\AbstractPreviewFactoryService.cs (1)
799
oldDocument.Project.Services.
GetRequiredService
<IContentTypeLanguageService>().GetDefaultContentType());
Shared\Extensions\HostWorkspaceServicesExtensions.cs (1)
83
l => hostWorkspaceServices.GetLanguageServices(l).
GetRequiredService
<IContentTypeLanguageService>().GetDefaultContentType().TypeName);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (1)
Completion\AbstractCompletionProviderTests.cs (1)
104
var completionService = project.Services.
GetRequiredService
<CompletionService>();
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Completion\CompletionServiceTests.cs (1)
44
var completionService = project.Services.
GetRequiredService
<CompletionService>();
Microsoft.CodeAnalysis.Features (14)
AddImport\AbstractAddImportFeatureService.cs (1)
423
var compilationService = project.Services.
GetRequiredService
<ICompilationFactoryService>();
ChangeSignature\AbstractChangeSignatureService.cs (1)
976
var syntaxFacts = services.
GetRequiredService
<ISyntaxFactsService>();
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.AbstractGlobalSuppressMessageCodeAction.cs (1)
86
var syntaxFacts = _project.Services.
GetRequiredService
<ISyntaxFactsService>();
Completion\Providers\ImportCompletionProvider\ExtensionMethodImportCompletionHelper.cs (1)
262
var syntaxFacts = project.Services.
GetRequiredService
<ISyntaxFactsService>();
EditAndContinue\DebuggingSession.cs (1)
800
var analyzer = newProject.Services.
GetRequiredService
<IEditAndContinueAnalyzer>();
EditAndContinue\EditAndContinueDocumentAnalysesCache.cs (1)
131
var analyzer = newDocument.Project.Services.
GetRequiredService
<IEditAndContinueAnalyzer>();
EditAndContinue\EditSession.cs (1)
624
var analyzer = newProject.Services.
GetRequiredService
<IEditAndContinueAnalyzer>();
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AbstractSymbolDescriptionBuilder.cs (1)
169
var formatter = LanguageServices.
GetRequiredService
<IDocumentationCommentFormattingService>();
LanguageServices\SymbolDisplayService\AbstractSymbolDisplayService.AnonymousTypes.cs (1)
32
var info = LanguageServices.
GetRequiredService
<IStructuralTypeDisplayService>().GetTypeDisplayInfo(
MetadataAsSource\MetadataAsSourceGeneratedFileInfo.cs (1)
37
: sourceProject.Solution.Services.GetLanguageServices(LanguageName).
GetRequiredService
<ISyntaxTreeFactoryService>().GetDefaultParseOptionsWithLatestLanguageVersion();
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (1)
154
var compilationFactory = sourceProject.Services.
GetRequiredService
<ICompilationFactoryService>();
PullMemberUp\MembersPuller.cs (2)
97
var codeGenerationService = document.Project.Services.
GetRequiredService
<ICodeGenerationService>();
272
var codeGenerationService = document.Project.Services.
GetRequiredService
<ICodeGenerationService>();
QuickInfo\CommonSemanticQuickInfoProvider.cs (1)
194
var syntaxFacts = languageServices.
GetRequiredService
<ISyntaxFactsService>();
Microsoft.CodeAnalysis.Features.UnitTests (5)
EditAndContinue\ActiveStatementsMapTests.cs (3)
122
var analyzer = project.Services.
GetRequiredService
<IEditAndContinueAnalyzer>();
177
var analyzer = project.Services.
GetRequiredService
<IEditAndContinueAnalyzer>();
228
var analyzer = project.Services.
GetRequiredService
<IEditAndContinueAnalyzer>();
EditAndContinue\EditSessionActiveStatementsTests.cs (2)
227
var analyzer = solution.GetProject(projectId).Services.
GetRequiredService
<IEditAndContinueAnalyzer>();
685
var analyzer = solution.GetProject(project.Id).Services.
GetRequiredService
<IEditAndContinueAnalyzer>();
Microsoft.CodeAnalysis.LanguageServer.Protocol (5)
ExternalAccess\Razor\SimplifyMethodHandler.cs (1)
68
var simplificationService = originalDocument.Project.Services.
GetRequiredService
<ISimplificationService>();
Handler\Breakpoints\ValidateBreakableRangeHandler.cs (1)
41
var breakpointService = document.Project.Services.
GetRequiredService
<IBreakpointResolutionService>();
Handler\Completion\CompletionResolveHandler.cs (1)
102
var completionService = document.Project.Services.
GetRequiredService
<CompletionService>();
Handler\Formatting\FormatDocumentOnTypeHandler.cs (1)
54
var formattingService = document.Project.Services.
GetRequiredService
<ISyntaxFormattingService>();
Handler\Symbols\DocumentSymbolsHandler.cs (1)
55
var navBarService = document.Project.Services.
GetRequiredService
<INavigationBarItemService>();
Microsoft.CodeAnalysis.Workspaces (44)
Classification\Classifier.cs (1)
79
var classificationService = projectServices.
GetRequiredService
<ISyntaxClassificationService>();
Editing\SyntaxGenerator.cs (2)
66
=> services.GetLanguageServices(language).
GetRequiredService
<SyntaxGenerator>();
78
=> project.Services.
GetRequiredService
<SyntaxGenerator>();
FindSymbols\FindReferences\DependentProjectsFinder.cs (1)
401
var factory = project.Services.
GetRequiredService
<ICompilationFactoryService>();
FindSymbols\FindReferences\DependentTypeFinder_ProjectIndex.cs (1)
54
project.Services.
GetRequiredService
<ISyntaxFactsService>().StringComparer);
FindSymbols\FindReferences\Finders\ConstructorSymbolReferenceFinder.cs (1)
84
if (TryGetNameWithoutAttributeSuffix(typeName, project.Services.
GetRequiredService
<ISyntaxFactsService>(), out var simpleName))
FindSymbols\FindReferences\Finders\NamedTypeSymbolReferenceFinder.cs (1)
88
var syntaxFacts = project.Services.
GetRequiredService
<ISyntaxFactsService>();
FindSymbols\Shared\AbstractSyntaxIndex.cs (1)
126
var syntaxKinds = project.LanguageServices.
GetRequiredService
<ISyntaxKindsService>();
FindSymbols\SyntaxTree\SyntaxTreeIndex_Create.cs (1)
43
var syntaxFacts = project.LanguageServices.
GetRequiredService
<ISyntaxFactsService>();
FindSymbols\TopLevelSyntaxTree\TopLevelSyntaxTreeIndex_Create.cs (1)
18
var infoFactory = project.LanguageServices.
GetRequiredService
<IDeclaredSymbolInfoFactoryService>();
Rename\ConflictEngine\ConflictResolver.cs (3)
157
var renameRewriterLanguageService = languageServices.
GetRequiredService
<IRenameRewriterLanguageService>();
158
var syntaxFactsLanguageService = languageServices.
GetRequiredService
<ISyntaxFactsService>();
206
var renameRewriterService = implicitReferenceLocationsPerLanguage.First().Document.Project.Services.
GetRequiredService
<IRenameRewriterLanguageService>();
Rename\ConflictEngine\ConflictResolver.Session.cs (1)
358
var syntaxFactsService = newDocument.Project.Services.
GetRequiredService
<ISyntaxFactsService>();
Shared\Extensions\IFindReferencesResultExtensions.cs (1)
131
var isCaseSensitive = solution.Services.GetLanguageServices(reference.Definition.Language).
GetRequiredService
<ISyntaxFactsService>().IsCaseSensitive;
Shared\Extensions\ITypeSymbolExtensions.cs (2)
150
var semanticFacts = provider.
GetRequiredService
<ISemanticFactsService>();
164
var syntaxFacts = provider.
GetRequiredService
<ISyntaxFactsService>();
Shared\Extensions\SemanticModelExtensions.cs (3)
76
var syntaxFacts = languageServices.
GetRequiredService
<ISyntaxFactsService>();
77
var syntaxKinds = languageServices.
GetRequiredService
<ISyntaxKindsService>();
82
var semanticFacts = languageServices.
GetRequiredService
<ISemanticFactsService>();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\AddImport\AddImportPlacementOptionsProviders.cs (1)
25
=> languageServices.
GetRequiredService
<IAddImportsService>().GetAddImportOptions(options, allowInHiddenRegions ?? AddImportPlacementOptions.Default.AllowInHiddenRegions);
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\AbstractCodeGenerationService.cs (1)
34
_symbolDeclarationService = languageServices.
GetRequiredService
<ISymbolDeclarationService>();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerationOptionsProviders.cs (2)
19
=> languageServices.
GetRequiredService
<ICodeGenerationService>().GetCodeGenerationOptions(options);
51
=> languageServices.
GetRequiredService
<ICodeGenerationService>().DefaultOptions;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeRefactorings\AbstractRefactoringHelpersService.cs (3)
44
var syntaxFacts = document.LanguageServices.
GetRequiredService
<ISyntaxFactsService>();
45
var headerFacts = document.LanguageServices.
GetRequiredService
<IHeaderFactsService>();
163
var syntaxKinds = document.LanguageServices.
GetRequiredService
<ISyntaxKindsService>();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
29
=> project.Services.
GetRequiredService
<TLanguageService>();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Formatting\SyntaxFormattingOptionsProviders.cs (2)
15
=> languageServices.
GetRequiredService
<ISyntaxFormattingService>().GetFormattingOptions(options);
27
=> languageServices.
GetRequiredService
<ISyntaxFormattingService>().DefaultOptions;
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Indentation\IIndentationService.cs (2)
50
var syntaxGenerator = document.LanguageServices.
GetRequiredService
<SyntaxGeneratorInternal>();
58
var indenter = document.LanguageServices.
GetRequiredService
<IIndentationService>();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Simplification\SimplifierOptionsProviders.cs (1)
27
=> languageServices.
GetRequiredService
<ISimplificationService>().DefaultOptions;
Workspace\CommandLineProject.cs (1)
34
var commandLineParser = languageServices.
GetRequiredService
<ICommandLineParserService>();
Workspace\Host\SolutionServices.cs (1)
62
=> this.GetLanguageServices(language).
GetRequiredService
<TLanguageService>();
Workspace\ProjectSystem\ProjectSystemProjectOptionsProcessor.cs (1)
53
_commandLineParserService = workspaceServices.GetLanguageServices(project.Language).
GetRequiredService
<ICommandLineParserService>();
Workspace\Solution\DocumentState.cs (4)
170
var treeFactory = languageServices.
GetRequiredService
<ISyntaxTreeFactoryService>();
357
var syntaxKinds = LanguageServices.
GetRequiredService
<ISyntaxKindsService>();
360
var treeFactory = LanguageServices.
GetRequiredService
<ISyntaxTreeFactoryService>();
516
var syntaxTreeFactory = LanguageServices.
GetRequiredService
<ISyntaxTreeFactoryService>();
Workspace\Solution\DocumentState_LinkedFileReuse.cs (2)
146
var treeFactory = languageServices.
GetRequiredService
<ISyntaxTreeFactoryService>();
215
var syntaxKinds = languageServices.
GetRequiredService
<ISyntaxKindsService>();
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker.cs (1)
649
var compilationFactory = this.ProjectState.LanguageServices.
GetRequiredService
<ICompilationFactoryService>();
Workspace\Solution\SolutionCompilationState.RegularCompilationTracker_Generators.cs (1)
395
var compilationFactory = projectState.LanguageServices.
GetRequiredService
<ICompilationFactoryService>();
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
SolutionTests\SolutionTests.cs (1)
1745
var defaultOptions = solution.Projects.Single().Services.
GetRequiredService
<ICompilationFactoryService>().GetDefaultCompilationOptions();
Microsoft.VisualStudio.LanguageServices (6)
Preview\PreviewUpdater.cs (1)
82
var contentTypeService = document.Project.Services.
GetRequiredService
<IContentTypeLanguageService>();
ProjectSystem\VisualStudioWorkspaceImpl.cs (2)
396
=> project.Services.
GetRequiredService
<ICompilationOptionsChangingService>().CanApplyChange(oldOptions, newOptions);
402
return project.Services.
GetRequiredService
<IParseOptionsChangingService>().CanApplyChange(oldOptions, newOptions, maxSupportLangVersion);
PullMemberUp\SymbolDependentsBuilder.cs (1)
50
_declarationService = project.Services.
GetRequiredService
<ISymbolDeclarationService>();
Venus\ContainedLanguageCodeSupport.cs (2)
205
var codeModel = targetDocument.Project.Services.
GetRequiredService
<ICodeModelNavigationPointService>();
206
var syntaxFacts = targetDocument.Project.Services.
GetRequiredService
<ISyntaxFactsService>();
Microsoft.VisualStudio.LanguageServices.Xaml (1)
Implementation\LanguageServer\Handler\Completion\CompletionHandler.cs (1)
65
var completionService = document.Project.Services.
GetRequiredService
<IXamlCompletionService>();