22 references to GetRequiredService
Microsoft.CodeAnalysis.CodeStyle.Fixes (4)
src\Analyzers\Core\CodeFixes\GenerateConstructor\AbstractGenerateConstructorService.State.cs (1)
241=> _document.Project.Solution.Workspace.Services.GetExtendedLanguageServices(language).GetRequiredService<TLanguageService>();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerator.cs (1)
24=> services.GetExtendedLanguageServices(language).GetRequiredService<ICodeGenerationService>();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\HostWorkspaceServicesExtensions.cs (1)
13=> hostWorkspaceServices.GetExtendedLanguageServices(languageName).GetRequiredService<TLanguageService>();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ProjectExtensions.cs (1)
27=> project.GetExtendedLanguageServices().GetRequiredService<TLanguageService>();
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (1)
LineSeparators\LineSeparatorTests.cs (1)
601var lineSeparatorService = Assert.IsType<CSharpLineSeparatorService>(workspace.Services.GetLanguageServices(LanguageNames.CSharp).GetRequiredService<ILineSeparatorService>());
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (4)
AbstractCommandHandlerTestState.cs (1)
70var contentType = Workspace.Services.GetLanguageServices(languageName).GetRequiredService<IContentTypeLanguageService>().GetDefaultContentType();
Completion\AbstractArgumentProviderTests`1.cs (1)
101var syntaxFacts = workspace.Services.GetLanguageServices(root.Language).GetRequiredService<ISyntaxFactsService>();
Formatting\CoreFormatterTestsBase.cs (1)
288var formattingService = workspace.Services.GetLanguageServices(node.Language).GetRequiredService<ISyntaxFormattingService>();
Workspaces\EditorTestHostDocument.cs (1)
149var contentType = LanguageServiceProvider.GetRequiredService<IContentTypeLanguageService>().GetDefaultContentType();
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (2)
CodeGeneration\AbstractCodeGenerationTests.cs (2)
81var codeDefFactory = workspace.Services.GetLanguageServices(LanguageNames.CSharp).GetRequiredService<SyntaxGenerator>(); 102var codeDefFactory = workspace.Services.GetLanguageServices(LanguageNames.VisualBasic).GetRequiredService<SyntaxGenerator>();
Microsoft.CodeAnalysis.Features (2)
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (2)
307var compilationOptions = languageServices.GetRequiredService<ICompilationFactoryService>().TryParsePdbCompilationOptions(pdbCompilationOptions); 308var parseOptions = languageServices.GetRequiredService<ISyntaxTreeFactoryService>().TryParsePdbParseOptions(pdbCompilationOptions);
Microsoft.CodeAnalysis.Workspaces (4)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\CodeGeneration\CodeGenerator.cs (1)
24=> services.GetExtendedLanguageServices(language).GetRequiredService<ICodeGenerationService>();
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\HostWorkspaceServicesExtensions.cs (1)
13=> hostWorkspaceServices.GetExtendedLanguageServices(languageName).GetRequiredService<TLanguageService>();
Workspace\Host\LanguageServices.cs (2)
35/// <inheritdoc cref="HostLanguageServices.GetRequiredService"/> 37=> _services.GetRequiredService<TLanguageService>();
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (1)
VisualStudioMSBuildWorkspaceTests.cs (1)
3129.GetRequiredService<ICommandLineParserService>();
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
Workspaces\TestWorkspace`1.cs (2)
772var syntaxFactory = languageServices.GetRequiredService<ISyntaxTreeFactoryService>(); 773var compilationFactory = languageServices.GetRequiredService<ICompilationFactoryService>();
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (2)
EditorConfigSettings\DataProvider\DataProviderTests.cs (2)
42=> GetWorkspace("/a/b/proj1.csproj").Services.GetLanguageServices(languageName).GetRequiredService<ILanguageSettingsProviderFactory<T>>(); 48=> GetWorkspace().Services.GetLanguageServices(languageName).GetRequiredService<ILanguageSettingsProviderFactory<T>>();