253 references to Services
AnalyzerRunner (2)
DiagnosticAnalyzerRunner.cs (2)
185var ideAnalyzerOptions = IdeAnalyzerOptions.GetDefault(project.Services); 396var ideAnalyzerOptions = IdeAnalyzerOptions.GetDefault(project.Services);
IdeBenchmarks (2)
FormatterBenchmarks.cs (2)
49var options = workspace.GlobalOptions.GetSyntaxFormattingOptions(document.Project.Services); 62var options = workspace.GlobalOptions.GetSyntaxFormattingOptions(document.Project.Services);
IdeCoreBenchmarks (1)
NavigateToBenchmarks.cs (1)
238var service = project.Services.GetService<INavigateToSearchService>();
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
CSharpUseLocalFunctionCodeFixProvider.cs (1)
96CodeGenerationContext.Default, CSharpCodeGenerationOptions.Default, new CSharpCodeGenerationService(document.Project.Services), root.SyntaxTree.Options.LanguageVersion());
MakeLocalFunctionStaticCodeFixHelper.cs (1)
172CodeGenerationContext.Default, CSharpCodeGenerationOptions.Default, new CSharpCodeGenerationService(document.Project.Services), root.SyntaxTree.Options.LanguageVersion());
Microsoft.CodeAnalysis.CSharp.EditorFeatures (2)
ConvertNamespace\ConvertNamespaceCommandHandler.cs (1)
153var formattingOptions = subjectBuffer.GetSyntaxFormattingOptions(_editorOptionsService, document.Project.Services, explicitFormat: false);
RawStringLiteral\RawStringLiteralCommandHandler_Return.cs (1)
102var indentationOptions = subjectBuffer.GetIndentationOptions(_editorOptionsService, document.Project.Services, explicitFormat: false);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (5)
ExtractMethod\ExtractMethodBase.cs (2)
136CodeGenerationOptions = CodeGenerationOptions.GetDefault(document.Project.Services), 160var (doc, _) = await result.GetFormattedDocumentAsync(CodeCleanupOptions.GetDefault(document.Project.Services), CancellationToken.None);
ExtractMethod\ExtractMethodTests.cs (1)
11258await service.ExtractMethodAsync(document, textSpan: default, localFunction: false, ExtractMethodGenerationOptions.GetDefault(project.Services), CancellationToken.None);
PdbSourceDocument\AbstractPdbSourceDocumentTests.cs (1)
135var file = await service.GetGeneratedFileAsync(workspace, project, symbol, signaturesOnly: false, MetadataAsSourceOptions.GetDefault(project.Services), CancellationToken.None).ConfigureAwait(false);
PdbSourceDocument\PdbSourceDocumentTests.cs (1)
870var options = MetadataAsSourceOptions.GetDefault(project.Services) with
Microsoft.CodeAnalysis.CSharp.Features (6)
ChangeSignature\CSharpChangeSignatureService.cs (1)
777return GetPermutedDocCommentTrivia(node, permutedParamNodes, document.Project.Services, options);
ExtractMethod\CSharpMethodExtractor.TriviaResult.cs (1)
24var preservationService = selectionResult.SemanticDocument.Document.Project.Services.GetService<ISyntaxTriviaService>();
ImplementInterface\CSharpImplementInterfaceCodeFixProvider.cs (1)
58.Select(n => service.GetCodeActions(document, context.Options.GetImplementTypeGenerationOptions(document.Project.Services), model, n, cancellationToken))
SignatureHelp\InvocationExpressionSignatureHelpProvider.cs (1)
165var structuralTypeDisplayService = document.Project.Services.GetRequiredService<IStructuralTypeDisplayService>();
SignatureHelp\ObjectCreationExpressionSignatureHelpProvider.cs (2)
108var structuralTypeDisplayService = document.Project.Services.GetRequiredService<IStructuralTypeDisplayService>(); 140var structuralTypeDisplayService = document.Project.Services.GetRequiredService<IStructuralTypeDisplayService>();
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
Rename\CSharpRenameRewriterLanguageService.cs (2)
149_simplificationService = parameters.Document.Project.Services.GetRequiredService<ISimplificationService>(); 150_semanticFactsService = parameters.Document.Project.Services.GetRequiredService<ISemanticFactsService>();
Microsoft.CodeAnalysis.EditorFeatures (11)
CodeDefinitionWindow\DefinitionContextTracker.cs (1)
210var options = _globalOptions.GetMetadataAsSourceOptions(document.Project.Services);
CommentSelection\AbstractCommentSelectionBase.cs (1)
155var formattingOptions = subjectBuffer.GetSyntaxFormattingOptions(_editorOptionsService, document.Project.Services, explicitFormat: false);
DocumentationComments\AbstractDocumentationCommentCommandHandler.cs (2)
96var options = subjectBuffer.GetDocumentationCommentOptions(_editorOptionsService, document.Project.Services); 336var options = subjectBuffer.GetDocumentationCommentOptions(_editorOptionsService, document.Project.Services);
InlineRename\InlineRenameSession.OpenTextBufferManager.cs (1)
592var contentType = preMergeDocument.Project.Services.GetService<IContentTypeLanguageService>().GetDefaultContentType();
IntelliSense\AsyncCompletion\CompletionSource.cs (2)
180return TryInvokeSnippetCompletion(triggerLocation.Snapshot.TextBuffer, triggerLocation.Position, sourceText, document.Project.Services, completionService.GetRules(options)); 187document.Project, document.Project.Services, sourceText, triggerLocation.Position, roslynTrigger, options, document.Project.Solution.Options, _roles);
Preview\AbstractPreviewFactoryService.cs (1)
760oldDocument.Project.Services.GetRequiredService<IContentTypeLanguageService>().GetDefaultContentType());
Shared\Extensions\ITextSnapshotExtensions.cs (1)
46var options = textBuffer.GetSyntaxFormattingOptions(editorOptionsService, document.Project.Services, explicitFormat: false);
SmartIndent\SmartIndent.cs (1)
51var indentationOptions = line.Snapshot.TextBuffer.GetIndentationOptions(_editorOptionsService, document.Project.Services, explicitFormat: false);
TextDiffing\EditorTextDifferencingService.cs (1)
40var diffService = _differenceSelectorService.GetTextDifferencingService(oldDocument.Project.Services.GetService<IContentTypeLanguageService>().GetDefaultContentType())
Microsoft.CodeAnalysis.EditorFeatures.DiagnosticsTests.Utilities (1)
CodeActions\SharedVerifierState.cs (1)
55=> IdeAnalyzerOptions ?? IdeAnalyzerOptions.GetDefault(project.Services);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (3)
Completion\AbstractCompletionProviderTests.cs (2)
105var completionService = project.Services.GetRequiredService<CompletionService>(); 1060var isTextualTriggerCharacterResult = service.ShouldTriggerCompletion(document.Project, document.Project.Services, text, position + 1, trigger, options, document.Project.Solution.Options, GetRoles(document));
Formatting\AbstractNewDocumentFormattingServiceTests.cs (1)
33var languageServices = document.Project.Services;
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (15)
CodeGeneration\AbstractCodeGenerationTests.cs (1)
42var options = document.Project.Services.GetRequiredService<ISimplificationService>().DefaultOptions;
CodeGeneration\CodeGenerationTests.cs (1)
882this.Service = Document.Project.Services.GetService<ICodeGenerationService>();
Completion\CompletionServiceTests.cs (1)
45var completionService = project.Services.GetRequiredService<CompletionService>();
Diagnostics\DiagnosticAnalyzerServiceTests.cs (2)
1066var ideAnalyzerOptions = IdeAnalyzerOptions.GetDefault(project.Services); 1115var ideAnalyzerOptions = IdeAnalyzerOptions.GetDefault(project.Services);
EditAndContinue\ActiveStatementsMapTests.cs (3)
96var analyzer = project.Services.GetRequiredService<IEditAndContinueAnalyzer>(); 151var analyzer = project.Services.GetRequiredService<IEditAndContinueAnalyzer>(); 202var analyzer = project.Services.GetRequiredService<IEditAndContinueAnalyzer>();
EditAndContinue\EditSessionActiveStatementsTests.cs (4)
231var analyzer = solution.GetProject(projectId).Services.GetRequiredService<IEditAndContinueAnalyzer>(); 358var analyzer = solution.GetProject(project.Id).Services.GetRequiredService<IEditAndContinueAnalyzer>(); 543var analyzer = solution.GetProject(project.Id).Services.GetRequiredService<IEditAndContinueAnalyzer>(); 689var analyzer = solution.GetProject(project.Id).Services.GetRequiredService<IEditAndContinueAnalyzer>();
MetadataAsSource\AbstractMetadataAsSourceTests.TestContext.cs (2)
80return _metadataAsSourceService.GetGeneratedFileAsync(Workspace, project, symbol, signaturesOnly, MetadataAsSourceOptions.GetDefault(project.Services)); 121var options = MetadataAsSourceOptions.GetDefault(project.Services);
Preview\PreviewWorkspaceTests.cs (1)
268var ideAnalyzerOptions = IdeAnalyzerOptions.GetDefault(project.Services);
Microsoft.CodeAnalysis.EditorFeatures.Wpf (2)
Peek\DefinitionPeekableItem.cs (1)
89var options = _peekableItem._globalOptions.GetMetadataAsSourceOptions(project.Services);
QuickInfo\Extensions.cs (1)
36var contentTypeService = document.Project.Services.GetService<IContentTypeLanguageService>();
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (2)
Classification\ClassificationTests.vb (1)
324Dim classificationService = project.Services.GetService(Of IClassificationService)()
Expansion\AbstractExpansionTest.vb (1)
31Dim cleanupOptions = CodeCleanupOptions.GetDefault(document.Project.Services)
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.OmniSharp (4)
Completion\OmniSharpCompletionService.cs (1)
25return completionService.ShouldTriggerCompletion(document.Project, document.Project.Services, text, caretPosition, trigger, options.ToCompletionOptions(), document.Project.Solution.Options, roles);
Formatting\OmniSharpSyntaxFormattingOptionsWrapper.cs (1)
26var defaultOptions = CodeCleanupOptions.GetDefault(document.Project.Services);
MetadataAsSource\OmniSharpMetadataAsSourceService.cs (2)
41GenerationOptions = CodeGenerationOptions.GetDefault(document.Project.Services), 65GenerationOptions = CodeGenerationOptions.GetDefault(document.Project.Services),
Microsoft.CodeAnalysis.Features (47)
AbstractUseConditionalExpressionCodeFixProvider.cs (1)
154fallbackOptions.GetOptions(document.Project.Services)?.ConditionalExpressionWrappingLength ??
AddImport\AbstractAddImportCodeFixProvider.cs (1)
59var codeActionOptions = context.Options.GetOptions(document.Project.Services);
AddImport\AbstractAddImportFeatureService.cs (1)
401var compilationService = project.Services.GetRequiredService<ICompilationFactoryService>();
AddPackage\AbstractAddPackageCodeFixProvider.cs (1)
55context.Options.GetOptions(document.Project.Services).SearchOptions.SearchNuGetPackages &&
ChangeSignature\AbstractChangeSignatureService.cs (1)
382var updater = doc.Project.Services.GetRequiredService<AbstractChangeSignatureService>();
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.AbstractGlobalSuppressMessageCodeAction.cs (1)
84var syntaxFacts = _project.Services.GetRequiredService<ISyntaxFactsService>();
CodeRefactorings\AddMissingImports\AbstractAddMissingImportsRefactoringProvider.cs (1)
45context.Options.GetOptions(document.Project.Services).HideAdvancedMembers);
Completion\CommonCompletionProvider.cs (1)
79var snippetService = document.Project.Services.GetService<ISnippetInfoService>();
Completion\CompletionProvider.cs (1)
58=> ShouldTriggerCompletion(document.Project.Services, await document.GetTextAsync(cancellationToken).ConfigureAwait(false), caretPosition, trigger, options, document.Project.Solution.Options);
Completion\CompletionService.cs (1)
101var languageServices = document?.Project.Services ?? _services.GetLanguageServices(Language);
Completion\CompletionService_GetCompletions.cs (2)
161if (ShouldTriggerCompletion(document.Project, document.Project.Services, text, caretPosition, trigger, options, passThroughOptions, roles)) 163var triggeredProviders = providers.Where(p => p.ShouldTriggerCompletion(document.Project.Services, text, caretPosition, trigger, options, passThroughOptions)).ToImmutableArrayOrEmpty();
Completion\Providers\AbstractAggregateEmbeddedLanguageCompletionProvider.cs (1)
92foreach (var language in GetLanguageProviders(context.Document.Project.Services))
Completion\Providers\ImportCompletionProvider\ExtensionMethodImportCompletionHelper.cs (1)
258var syntaxFacts = project.Services.GetRequiredService<ISyntaxFactsService>();
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (1)
335var generator = project.Services.GetRequiredService<SyntaxGenerator>();
EditAndContinue\DebuggingSession.cs (4)
682var analyzer = newProject.Services.GetRequiredService<IEditAndContinueAnalyzer>(); 807var analyzer = newProject.Services.GetRequiredService<IEditAndContinueAnalyzer>(); 960var analyzer = newDocument.Project.Services.GetRequiredService<IEditAndContinueAnalyzer>(); 1061var analyzer = newProject.Services.GetRequiredService<IEditAndContinueAnalyzer>();
EditAndContinue\EditAndContinueDocumentAnalysesCache.cs (2)
138var analyzer = newDocument.Project.Services.GetRequiredService<IEditAndContinueAnalyzer>(); 196var analyzer = document.Project.Services.GetRequiredService<IEditAndContinueAnalyzer>();
EditAndContinue\EditSession.cs (1)
619var analyzer = newProject.Services.GetRequiredService<IEditAndContinueAnalyzer>();
EditAndContinue\Extensions.cs (1)
77=> project.Services.GetService<IEditAndContinueAnalyzer>() != null;
ExternalAccess\UnitTesting\SolutionCrawler\AbstractUnitTestingDocumentDifferenceService.cs (1)
21var syntaxFactsService = newDocument.Project.Services.GetService<ISyntaxFactsService>();
ExternalAccess\VSTypeScript\VSTypeScriptDocumentDiagnosticAnalyzer.cs (2)
20var analyzer = document.Project.Services.GetRequiredService<VSTypeScriptDiagnosticAnalyzerLanguageService>().Implementation; 31var analyzer = document.Project.Services.GetRequiredService<VSTypeScriptDiagnosticAnalyzerLanguageService>().Implementation;
ExternalAccess\VSTypeScript\VSTypeScriptProjectDiagnosticAnalyzer.cs (1)
20var analyzer = project.Services.GetRequiredService<VSTypeScriptDiagnosticAnalyzerLanguageService>().Implementation;
ExtractMethod\MethodExtractor.Analyzer.cs (3)
351var syntaxFactsService = _semanticDocument.Document.Project.Services.GetService<ISyntaxFactsService>(); 592var semanticFacts = _semanticDocument.Document.Project.Services.GetRequiredService<ISemanticFactsService>(); 915var semanticFacts = _semanticDocument.Document.Project.Services.GetRequiredService<ISemanticFactsService>();
ExtractMethod\SelectionResult.cs (2)
132if (SemanticDocument.Project.Services.GetService<ISyntaxFactsService>().IsAwaitKeyword(currentToken) 167var syntaxFacts = SemanticDocument.Project.Services.GetService<ISyntaxFactsService>();
FullyQualify\AbstractFullyQualifyCodeFixProvider.cs (1)
25var hideAdvancedMembers = context.Options.GetOptions(document.Project.Services).HideAdvancedMembers;
FullyQualify\AbstractFullyQualifyService.cs (1)
223newDocument, CodeCleanupOptions.GetDefault(document.Project.Services), cancellationToken).ConfigureAwait(false);
GenerateType\AbstractGenerateTypeService.Editor.cs (1)
142_targetLanguageService = _generateTypeOptionsResult.Project.Services.GetService<IGenerateTypeService>();
ImplementAbstractClass\AbstractImplementAbstractClassCodeFixProvider.cs (1)
42document, classNode, GetClassIdentifier(classNode), context.Options.GetImplementTypeGenerationOptions(document.Project.Services), cancellationToken).ConfigureAwait(false);
ImplementInterface\AbstractImplementInterfaceService.CodeAction_Property.cs (1)
167var generator = Document.Project.Services.GetRequiredService<SyntaxGenerator>();
ImplementInterface\AbstractImplementInterfaceService.DisposePatternCodeAction.cs (1)
341var fallbackFormattingOptions = await ((OptionsProvider<SyntaxFormattingOptions>)Options.FallbackOptions).GetOptionsAsync(document.Project.Services, cancellationToken).ConfigureAwait(false);
IntroduceVariable\AbstractIntroduceVariableService.cs (1)
302var syntaxFacts = currentDocument.Project.Services.GetService<ISyntaxFactsService>();
IntroduceVariable\AbstractIntroduceVariableService.State.cs (1)
274var semanticFacts = Document.Project.Services.GetService<ISemanticFactsService>();
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (1)
151var sourceFromMetadataService = temporaryDocument.Project.Services.GetRequiredService<IMetadataAsSourceService>();
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (1)
142var compilationFactory = sourceProject.Services.GetRequiredService<ICompilationFactoryService>();
PullMemberUp\MembersPuller.cs (2)
104var codeGenerationService = document.Project.Services.GetRequiredService<ICodeGenerationService>(); 283var codeGenerationService = document.Project.Services.GetRequiredService<ICodeGenerationService>();
SolutionCrawler\AbstractDocumentDifferenceService.cs (1)
22var syntaxFactsService = newDocument.Project.Services.GetService<ISyntaxFactsService>();
SpellCheck\AbstractSpellCheckCodeFixProvider.cs (1)
121HideAdvancedMembers = context.Options.GetOptions(document.Project.Services).HideAdvancedMembers,
Wrapping\AbstractWrappingCodeRefactoringProvider.cs (1)
49var options = GetWrappingOptions(configOptions, context.Options.GetOptions(document.Project.Services));
Microsoft.CodeAnalysis.LanguageServer.Protocol (15)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.ProjectState.cs (1)
259var simplifierOptions = globalOptions.GetSimplifierOptions(document.Project.Services);
Features\Options\AddImportPlacementOptionsStorage.cs (1)
15=> document.GetAddImportPlacementOptionsAsync(globalOptions.GetAddImportPlacementOptions(document.Project.Services), cancellationToken);
Features\Options\CodeCleanupOptionsStorage.cs (1)
15=> document.GetCodeCleanupOptionsAsync(globalOptions.GetCodeCleanupOptions(document.Project.Services), cancellationToken);
Features\Options\CodeGenerationOptionsStorage.cs (2)
15=> document.GetCodeGenerationOptionsAsync(globalOptions.GetCodeGenerationOptions(document.Project.Services), cancellationToken); 18=> document.GetCleanCodeGenerationOptionsAsync(globalOptions.GetCleanCodeGenerationOptions(document.Project.Services), cancellationToken);
Features\Options\ExtractMethodOptionsStorage.cs (1)
34=> document.GetExtractMethodGenerationOptionsAsync(globalOptions.GetExtractMethodGenerationOptions(document.Project.Services), cancellationToken);
Features\Options\IdeAnalyzerOptionsStorage.cs (1)
16=> GetIdeAnalyzerOptions(globalOptions, project.Services);
Features\Options\SimplifierOptionsStorage.cs (1)
15=> document.GetSimplifierOptionsAsync(globalOptions.GetSimplifierOptions(document.Project.Services), cancellationToken);
Features\Options\SyntaxFormattingOptionsStorage.cs (1)
15=> document.GetSyntaxFormattingOptionsAsync(globalOptions.GetSyntaxFormattingOptions(document.Project.Services), cancellationToken);
Handler\Breakpoints\ValidateBreakableRangeHandler.cs (1)
41var breakpointService = document.Project.Services.GetRequiredService<IBreakpointResolutionService>();
Handler\Completion\CompletionResolveHandler.cs (1)
55var completionService = document.Project.Services.GetRequiredService<CompletionService>();
Handler\Definitions\AbstractGoToDefinitionHandler.cs (1)
74var options = _globalOptions.GetMetadataAsSourceOptions(document.Project.Services);
Handler\Formatting\FormatDocumentOnTypeHandler.cs (1)
58var formattingService = document.Project.Services.GetRequiredService<ISyntaxFormattingService>();
Handler\References\FindUsagesLSPContext.cs (1)
222var options = _globalOptions.GetMetadataAsSourceOptions(_document.Project.Services);
Handler\Symbols\DocumentSymbolsHandler.cs (1)
46var navBarService = document.Project.Services.GetRequiredService<INavigationBarItemService>();
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (2)
Options\LspOptionsTests.cs (2)
38var project = testLspServer.GetCurrentSolution().Projects.Single().Services; 52var project = testLspServer.GetCurrentSolution().Projects.Single().Services;
Microsoft.CodeAnalysis.LanguageServerIndexFormat.Generator (1)
Generator.cs (1)
261var languageServices = document.Project.Services;
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (4)
EndConstructGeneration\EndConstructCommandHandler.vb (1)
143Dim options = buffer.GetCodeCleanupOptions(_editorOptionsService, document.Project.Services, explicitFormat:=False, allowImportsInHiddenRegions:=document.AllowImportsInHiddenRegions())
LineCommit\CommitFormatter.vb (2)
75Dim cleanupOptions = buffer.GetCodeCleanupOptions(_editorOptionsService, document.Project.Services, isExplicitFormat, allowImportsInHiddenRegions:=document.AllowImportsInHiddenRegions()) 78document.Project.Services,
Utilities\CommandHandlers\AbstractImplementAbstractClassOrInterfaceCommandHandler.vb (1)
168Dim newDocument = TryGetNewDocument(document, _globalOptions.GetImplementTypeGenerationOptions(document.Project.Services), identifier, cancellationToken)
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures.UnitTests (3)
CaseCorrecting\CaseCorrectionServiceTests.vb (1)
37Dim options = CodeCleanupOptions.GetDefault(document.Project.Services)
ExtractMethod\ExtractMethodTests.vb (2)
106Dim cleanupOptions = CodeCleanupOptions.GetDefault(document.Project.Services) 120CodeGenerationOptions.GetDefault(document.Project.Services),
Microsoft.CodeAnalysis.VisualBasic.Features (4)
ChangeSignature\VisualBasicChangeSignatureService.vb (1)
630Return GetPermutedDocCommentTrivia(node, permutedParamNodes, document.Project.Services, options)
ExtractMethod\VisualBasicMethodExtractor.TriviaResult.vb (1)
16Dim preservationService = selectionResult.SemanticDocument.Document.Project.Services.GetService(Of ISyntaxTriviaService)()
GenerateMember\GenerateParameterizedMember\VisualBasicGenerateParameterizedMemberService.vb (1)
57Dim typeInference = Document.Project.Services.GetService(Of ITypeInferenceService)()
ImplementInterface\VisualBasicImplementInterfaceCodeFixProvider.vb (1)
65context.Options.GetImplementTypeGenerationOptions(document.Project.Services),
Microsoft.CodeAnalysis.VisualBasic.Workspaces (3)
Rename\VisualBasicRenameRewriterLanguageService.vb (3)
125_simplificationService = parameters.Document.Project.Services.GetRequiredService(Of ISimplificationService)() 126_syntaxFactsService = parameters.Document.Project.Services.GetRequiredService(Of ISyntaxFactsService)() 127_semanticFactsService = parameters.Document.Project.Services.GetRequiredService(Of ISemanticFactsService)()
Microsoft.CodeAnalysis.Workspaces (32)
AddImportPlacementOptions.cs (2)
58return configOptions.GetAddImportPlacementOptions(document.Project.Services, document.AllowImportsInHiddenRegions(), fallbackOptions); 68=> await GetAddImportPlacementOptionsAsync(document, await fallbackOptionsProvider.GetOptionsAsync(document.Project.Services, cancellationToken).ConfigureAwait(false), cancellationToken).ConfigureAwait(false);
CleanCodeGenerationOptions.cs (1)
84=> await document.GetCleanCodeGenerationOptionsAsync(await ((OptionsProvider<CleanCodeGenerationOptions>)fallbackOptionsProvider).GetOptionsAsync(document.Project.Services, cancellationToken).ConfigureAwait(false), cancellationToken).ConfigureAwait(false);
CodeCleanupOptions.cs (2)
99return configOptions.GetCodeCleanupOptions(document.Project.Services, document.AllowImportsInHiddenRegions(), fallbackOptions); 103=> await document.GetCodeCleanupOptionsAsync(await ((OptionsProvider<CodeCleanupOptions>)fallbackOptionsProvider).GetOptionsAsync(document.Project.Services, cancellationToken).ConfigureAwait(false), cancellationToken).ConfigureAwait(false);
CodeGenerationOptions.cs (3)
130return configOptions.GetCodeGenerationOptions(document.Project.Services, fallbackOptions); 134=> await GetCodeGenerationOptionsAsync(document, await ((OptionsProvider<CodeGenerationOptions>)fallbackOptionsProvider).GetOptionsAsync(document.Project.Services, cancellationToken).ConfigureAwait(false), cancellationToken).ConfigureAwait(false); 141var service = document.Project.Services.GetRequiredService<ICodeGenerationService>();
DocumentFormattingOptions.cs (1)
53=> await document.GetDocumentFormattingOptionsAsync(await fallbackOptionsProvider.GetOptionsAsync(document.Project.Services, cancellationToken).ConfigureAwait(false), cancellationToken).ConfigureAwait(false);
Editing\SyntaxGenerator.cs (1)
71=> project.Services.GetRequiredService<SyntaxGenerator>();
ExtractMethod\ExtractMethodOptions.cs (2)
56fallbackOptions ??= ExtractMethodGenerationOptions.GetDefault(document.Project.Services); 68=> document.GetExtractMethodGenerationOptionsAsync(fallbackOptions.GetExtractMethodGenerationOptions(document.Project.Services), cancellationToken);
FindSymbols\FindReferences\DependentProjectsFinder.cs (1)
283compilation = project.Services.GetRequiredService<ICompilationFactoryService>().CreateCompilation(
FindSymbols\FindReferences\DependentTypeFinder_ProjectIndex.cs (1)
57project.Services.GetRequiredService<ISyntaxFactsService>().StringComparer);
FindSymbols\FindReferences\Finders\ConstructorSymbolReferenceFinder.cs (1)
85var documentsWithAttribute = TryGetNameWithoutAttributeSuffix(typeName, project.Services.GetRequiredService<ISyntaxFactsService>(), out var simpleName)
FindSymbols\FindReferences\Finders\NamedTypeSymbolReferenceFinder.cs (1)
89var syntaxFacts = project.Services.GetRequiredService<ISyntaxFactsService>();
Formatting\Formatter.cs (1)
37=> GetDefaultFormattingRules(document.Project.Services);
LineFormattingOptions.cs (1)
55=> await GetLineFormattingOptionsAsync(document, await fallbackOptionsProvider.GetOptionsAsync(document.Project.Services, cancellationToken).ConfigureAwait(false), cancellationToken).ConfigureAwait(false);
NamingStyleOptions.cs (1)
54return await fallbackOptionsProvider.GetOptionsAsync(document.Project.Services, cancellationToken).ConfigureAwait(false);
OrganizeImports\OrganizeImportsOptions.cs (1)
55=> await GetOrganizeImportsOptionsAsync(document, await fallbackOptionsProvider.GetOptionsAsync(document.Project.Services, cancellationToken).ConfigureAwait(false), cancellationToken).ConfigureAwait(false);
ProjectExtensions.cs (2)
22=> project?.Services.GetService<TLanguageService>(); 29=> project.Services.GetRequiredService<TLanguageService>();
Rename\ConflictEngine\ConflictResolver.cs (3)
208var renameRewriterService = implicitReferenceLocationsPerLanguage.First().Document.Project.Services.GetRequiredService<IRenameRewriterLanguageService>(); 251var semanticFactsService = projectOpt.Services.GetRequiredService<ISemanticFactsService>(); 297var languageRenameService = projectOpt.Services.GetRequiredService<IRenameRewriterLanguageService>();
Rename\ConflictEngine\ConflictResolver.Session.cs (1)
355var syntaxFactsService = newDocument.Project.Services.GetRequiredService<ISyntaxFactsService>();
SimplifierOptions.cs (2)
84return configOptions.GetSimplifierOptions(document.Project.Services, fallbackOptions); 88=> await document.GetSimplifierOptionsAsync(await fallbackOptionsProvider.GetOptionsAsync(document.Project.Services, cancellationToken).ConfigureAwait(false), cancellationToken).ConfigureAwait(false);
SyntaxFormattingOptions.cs (2)
69return configOptions.GetSyntaxFormattingOptions(document.Project.Services, fallbackOptions); 73=> await GetSyntaxFormattingOptionsAsync(document, await ((OptionsProvider<SyntaxFormattingOptions>)fallbackOptionsProvider).GetOptionsAsync(document.Project.Services, cancellationToken).ConfigureAwait(false), cancellationToken).ConfigureAwait(false);
Workspace\Solution\Project.cs (2)
97public bool SupportsCompilation => this.Services.GetService<ICompilationFactoryService>() != null; 102[Obsolete($"Use {nameof(Services)} instead.")]
Microsoft.CodeAnalysis.Workspaces.UnitTests (19)
CodeCleanup\AddMissingTokensTests.cs (1)
2722var cleanDocument = await CodeCleaner.CleanupAsync(document, textSpans[0], CodeCleanupOptions.GetDefault(document.Project.Services), codeCleanups);
CodeCleanup\CodeCleanupTests.cs (12)
44var cleanDocument = await CodeCleaner.CleanupAsync(document, ImmutableArray<TextSpan>.Empty, CodeCleanupOptions.GetDefault(document.Project.Services)); 53var cleanDocument = await CodeCleaner.CleanupAsync(document, CodeCleanupOptions.GetDefault(document.Project.Services)); 63var cleanDocument = await CodeCleaner.CleanupAsync(document, root.FullSpan, CodeCleanupOptions.GetDefault(document.Project.Services)); 73var cleanDocument = await CodeCleaner.CleanupAsync(document, ImmutableArray.Create(root.FullSpan), CodeCleanupOptions.GetDefault(document.Project.Services)); 96var cleanDocument = await CodeCleaner.CleanupAsync(document, ImmutableArray<TextSpan>.Empty, CodeCleanupOptions.GetDefault(document.Project.Services)); 106var cleanDocument = await CodeCleaner.CleanupAsync(document, CodeCleanupOptions.GetDefault(document.Project.Services)); 117var cleanDocument = await CodeCleaner.CleanupAsync(document, root.FullSpan, CodeCleanupOptions.GetDefault(document.Project.Services)); 128var cleanDocument = await CodeCleaner.CleanupAsync(document, ImmutableArray.Create(root.FullSpan), CodeCleanupOptions.GetDefault(document.Project.Services)); 140var cleanDocument = await CodeCleaner.CleanupAsync(document, annotation, CodeCleanupOptions.GetDefault(document.Project.Services)); 153var cleanDocument = await CodeCleaner.CleanupAsync(document, annotation, CodeCleanupOptions.GetDefault(document.Project.Services)); 324var cleanDocument = await CodeCleaner.CleanupAsync(document, CodeCleanupOptions.GetDefault(document.Project.Services)); 408CodeCleaner.CleanupAsync(document, spans, CodeCleanupOptions.GetDefault(document.Project.Services), codeCleanups.Concat(spanCodeCleanup)).Wait();
CodeCleanup\FixIncorrectTokenTests.cs (1)
747var cleanDocument = await CodeCleaner.CleanupAsync(document, textSpans[0], CodeCleanupOptions.GetDefault(document.Project.Services), codeCleanups);
CodeCleanup\NormalizeModifiersOrOperatorsTests.cs (1)
1023var cleanDocument = await CodeCleaner.CleanupAsync(document, textSpans[0], CodeCleanupOptions.GetDefault(document.Project.Services), codeCleanups);
CodeCleanup\ReduceTokenTests.cs (1)
2011var cleanDocument = await CodeCleaner.CleanupAsync(document, textSpans[0], CodeCleanupOptions.GetDefault(document.Project.Services), codeCleanups);
CodeCleanup\RemoveUnnecessaryLineContinuationTests.cs (1)
1380var cleanDocument = await CodeCleaner.CleanupAsync(document, textSpans[0], CodeCleanupOptions.GetDefault(document.Project.Services), codeCleanups);
SolutionTests\SolutionTests.cs (2)
1240var defaultOptions = solution.Projects.Single().Services.GetRequiredService<ICompilationFactoryService>().GetDefaultCompilationOptions(); 3796var factory = dummyProject.Services.GetService<ISyntaxTreeFactoryService>();
Microsoft.VisualStudio.LanguageServices (27)
CodeCleanup\AbstractCodeCleanUpFixer.cs (4)
139var options = _globalOptions.GetCodeActionOptions(document.Project.Services); 208var options = _globalOptions.GetCodeActionOptions(document.Project.Services); 295var ideOptions = _globalOptions.GetCodeActionOptions(project.Services); 317=> project.Services.GetService<ICodeCleanupService>() != null;
Implementation\AbstractVsTextViewFilter.cs (1)
117var languageDebugInfo = document.Project.Services.GetService<ILanguageDebugInfoService>();
LanguageService\AbstractLanguageService`2.IVsLanguageTextOps.cs (2)
59var formattingOptions = textBuffer.GetSyntaxFormattingOptions(EditorOptionsService, document.Project.Services, explicitFormat: true); 69var rules = ruleFactory.CreateRule(documentSyntax, start).Concat(Formatter.GetDefaultFormattingRules(document.Project.Services));
Library\ObjectBrowser\AbstractDescriptionBuilder.cs (1)
296var formattingService = _project.Services.GetService<IDocumentationCommentFormattingService>();
Library\ObjectBrowser\ObjectList.cs (1)
693var helpContextService = project.Services.GetService<IHelpContextService>();
Preview\FileChange.cs (1)
83left.Project.Services.GetService<IContentTypeLanguageService>().GetDefaultContentType());
Preview\PreviewUpdater.cs (1)
84var contentTypeService = document.Project.Services.GetRequiredService<IContentTypeLanguageService>();
ProjectSystem\VisualStudioWorkspaceImpl.cs (4)
404=> project.Services.GetRequiredService<ICompilationOptionsChangingService>().CanApplyChange(oldOptions, newOptions); 410return project.Services.GetRequiredService<IParseOptionsChangingService>().CanApplyChange(oldOptions, newOptions, maxSupportLangVersion); 503var compilationOptionsService = originalProject.Services.GetRequiredService<ICompilationOptionsChangingService>(); 520var parseOptionsService = CurrentSolution.GetRequiredProject(projectId).Services.GetRequiredService<IParseOptionsChangingService>();
PullMemberUp\SymbolDependentsBuilder.cs (1)
50_declarationService = project.Services.GetRequiredService<ISymbolDeclarationService>();
Snippets\AbstractSnippetExpansionClient.cs (1)
1067var languageServices = documentWithImports.Project.Services;
TableDataSource\Suppression\VisualStudioSuppressionFixService.cs (2)
306var languageServices = projectDiagnosticsToFixMap.Select(p => p.Key.Services).Concat(documentDiagnosticsToFixMap.Select(kvp => kvp.Key.Project.Services)).ToHashSet();
Venus\ContainedDocument.cs (1)
776var formattingOptions = subjectBuffer.GetSyntaxFormattingOptions(editorOptionsService, document.Project.Services, explicitFormat: false);
Venus\ContainedLanguage.IVsContainedLanguageCodeSupport.cs (1)
77additionalFormattingRule: targetDocument.Project.Services.GetService<IAdditionalFormattingRuleLanguageService>().GetAdditionalCodeGenerationRule(),
Venus\ContainedLanguageCodeSupport.cs (4)
206var codeModel = targetDocument.Project.Services.GetRequiredService<ICodeModelNavigationPointService>(); 207var syntaxFacts = targetDocument.Project.Services.GetRequiredService<ISyntaxFactsService>(); 221var fallbackOptions = globalOptions.GetCleanCodeGenerationOptions(targetDocument.Project.Services); 274var codeModel = thisDocument.Project.Services.GetService<ICodeModelNavigationPointService>();
Workspace\VisualStudioSymbolNavigationService.cs (2)
110var libraryService = project.Services.GetService<ILibraryService>(); 140var masOptions = _globalOptions.GetMetadataAsSourceOptions(project.Services);
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (1)
CodeModel\FileCodeModelTestHelpers.cs (1)
52project.Services,
Microsoft.VisualStudio.LanguageServices.Implementation (3)
CodeModel\ProjectCodeModel.cs (1)
68_codeModelCache = new CodeModelProjectCache(_threadingContext, _projectId, _codeModelInstanceFactory, _projectCodeModelFactory, _serviceProvider, workspaceProject.Services, _visualStudioWorkspace);
Options\AbstractOptionPreviewViewModel.cs (1)
138var fallbackFormattingOptions = OptionStore.GlobalOptions.GetSyntaxFormattingOptions(document.Project.Services);
RoslynVisualStudioWorkspace.cs (1)
155var codeModelService = project.Services.GetService<ICodeModelService>();
Microsoft.VisualStudio.LanguageServices.Test.Utilities2 (1)
CodeModel\CodeModelTestHelpers.vb (1)
67project.Services,
Microsoft.VisualStudio.LanguageServices.UnitTests (10)
ChangeSignature\ChangeSignatureViewModelTests.vb (1)
466Dim token = Await tree.GetTouchingWordAsync(doc.CursorPosition.Value, workspaceDoc.Project.Services.GetService(Of ISyntaxFactsService)(), CancellationToken.None)
CodeModel\AbstractEventCollectorTests.vb (1)
105Dim codeModelService = project.Services.GetService(Of ICodeModelService)()
CodeModel\CSharp\SyntaxNodeKeyTests.vb (1)
232Dim codeModelService = project.Services.GetService(Of ICodeModelService)()
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 (13)
Implementation\LanguageServer\Extensions\SymbolExtensions.cs (2)
32var formatter = codeProject.Services.GetService<IDocumentationCommentFormattingService>(); 38var symbolDisplayService = codeProject.Services.GetService<ISymbolDisplayService>();
Implementation\LanguageServer\Handler\Commands\CreateEventCommandHandler.cs (1)
55var commandService = document.Project.Services.GetService<IXamlCommandService>();
Implementation\LanguageServer\Handler\Completion\CompletionHandler.cs (1)
64var completionService = document.Project.Services.GetRequiredService<IXamlCompletionService>();
Implementation\LanguageServer\Handler\Completion\CompletionResolveHandler.cs (1)
74var completionService = document.Project.Services.GetRequiredService<IXamlCompletionService>();
Implementation\LanguageServer\Handler\Definitions\GoToDefinitionHandler.cs (2)
61var xamlGoToDefinitionService = document.Project.Services.GetService<IXamlGoToDefinitionService>(); 177var options = globalOptions.GetMetadataAsSourceOptions(project.Services);
Implementation\LanguageServer\Handler\FoldingRanges\FoldingRangesHandler.cs (1)
44var xamlStructureService = document.Project.Services.GetService<IXamlStructureService>();
Implementation\LanguageServer\Handler\Formatting\AbstractFormatDocumentHandlerBase.cs (1)
32var formattingService = document?.Project.Services.GetService<IXamlFormattingService>();
Implementation\LanguageServer\Handler\Formatting\FormatDocumentOnTypeHandler.cs (1)
46var formattingService = document?.Project.Services.GetService<IXamlFormattingService>();
Implementation\LanguageServer\Handler\Hover\HoverHandler.cs (1)
54var quickInfoService = document.Project.Services.GetService<IXamlQuickInfoService>();
Implementation\LanguageServer\Handler\OnAutoInsert\OnAutoInsertHandler.cs (1)
42var insertService = document.Project.Services.GetService<IXamlAutoInsertService>();
Implementation\LanguageServer\Handler\OnTypeRename\OnTypeRenameHandler.cs (1)
74var renameService = document.Project.Services.GetService<IXamlTypeRenameService>();
Roslyn.VisualStudio.Next.UnitTests (1)
Services\VisualStudioDiagnosticAnalyzerExecutorTests.cs (1)
232var ideAnalyzerOptions = IdeAnalyzerOptions.GetDefault(project.Services);