372 references to Services
IdeBenchmarks (1)
RegexClassifierBenchmarks.cs (1)
84
var extensionManager = document.Project.Solution.
Services
.GetService<IExtensionManager>();
Microsoft.CodeAnalysis.CodeStyle.Fixes (24)
AbstractChangeNamespaceToMatchFolderCodeFixProvider.cs (1)
27
var service = context.Document.Project.Solution.
Services
.GetRequiredService<ISupportedChangesService>();
AbstractMakeMethodSynchronousCodeFixProvider.cs (1)
177
var editor = new SyntaxEditor(root, currentSolution.
Services
);
AbstractMoveDeclarationNearReferenceService.cs (1)
83
var editor = new SyntaxEditor(root, document.Project.Solution.
Services
);
AbstractRemoveAsyncModifierCodeFixProvider.cs (1)
67
var solutionServices = document.Project.Solution.
Services
;
AbstractRemoveUnusedValuesCodeFixProvider.cs (1)
292
var editor = new SyntaxEditor(root, document.Project.Solution.
Services
);
AbstractUnsealClassCodeFixProvider.cs (1)
66
var editor = new SyntaxEditor(root, document.Project.Solution.
Services
);
AbstractUseCollectionInitializerCodeFixProvider.cs (1)
99
var subEditor = new SyntaxEditor(currentRoot, document.Project.Solution.
Services
);
AbstractUseConditionalExpressionCodeFixProvider.cs (1)
62
var nestedEditor = new SyntaxEditor(root, document.Project.Solution.
Services
);
AbstractUseObjectInitializerCodeFixProvider.cs (1)
100
var subEditor = new SyntaxEditor(currentRoot, document.Project.Solution.
Services
);
AddParameterService.cs (1)
107
var editor = new SyntaxEditor(syntaxRoot, solution.
Services
);
CodeGenerator.cs (10)
31
=> GetCodeGenerationService(context.Solution.
Services
, destination.Language).AddEventAsync(context, destination, @event, cancellationToken);
38
=> GetCodeGenerationService(context.Solution.
Services
, destination.Language).AddFieldAsync(context, destination, field, cancellationToken);
45
=> GetCodeGenerationService(context.Solution.
Services
, destination.Language).AddMethodAsync(context, destination, method, cancellationToken);
52
=> GetCodeGenerationService(context.Solution.
Services
, destination.Language).AddPropertyAsync(context, destination, property, cancellationToken);
59
=> GetCodeGenerationService(context.Solution.
Services
, destination.Language).AddNamedTypeAsync(context, destination, namedType, cancellationToken);
66
=> GetCodeGenerationService(context.Solution.
Services
, destination.Language).AddNamedTypeAsync(context, destination, namedType, cancellationToken);
73
=> GetCodeGenerationService(context.Solution.
Services
, destination.Language).AddNamespaceAsync(context, destination, @namespace, cancellationToken);
80
=> GetCodeGenerationService(context.Solution.
Services
, destination.Language).AddNamespaceOrTypeAsync(context, destination, namespaceOrType, cancellationToken);
87
=> GetCodeGenerationService(context.Solution.
Services
, destination.Language).AddMembersAsync(context, destination, members, cancellationToken);
93
=> GetCodeGenerationService(solution.
Services
, destination.Language).CanAddTo(destination, solution, cancellationToken);
DocumentExtensions.cs (1)
144
var semanticModelService = document.Project.Solution.
Services
.GetRequiredService<ISemanticModelReuseWorkspaceService>();
SupportedChangesServiceExtensions.cs (2)
10
=> solution.
Services
.GetRequiredService<ISupportedChangesService>().CanApplyChange(kind);
13
=> project.Solution.
Services
.GetRequiredService<ISupportedChangesService>().CanApplyParseOptionChange(oldOptions, newOptions, project);
SyntaxEditorBasedCodeFixProvider.cs (1)
82
var editor = new SyntaxEditor(root, document.Project.Solution.
Services
);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (7)
CSharpInlineDeclarationCodeFixProvider.cs (1)
118
var editor = new SyntaxEditor(currentRoot, document.Project.Solution.
Services
);
CSharpRemoveConfusingSuppressionCodeFixProvider.cs (1)
67
var editor = new SyntaxEditor(root, document.Project.Solution.
Services
);
CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (1)
43
var editor = new SyntaxEditor(memberDeclaration, document.Project.Solution.
Services
);
CSharpUseDeconstructionCodeFixProvider.cs (1)
68
var editor = new SyntaxEditor(root, document.Project.Solution.
Services
);
CSharpUseLocalFunctionCodeFixProvider.cs (1)
117
document.Project.Solution.
Services
, currentRoot,
EmbeddedStatementPlacementCodeFixProvider.cs (1)
51
var editor = new SyntaxEditor(root, document.Project.Solution.
Services
);
MakeLocalFunctionStaticCodeFixHelper.cs (1)
36
var syntaxEditor = new SyntaxEditor(root, document.Project.Solution.
Services
);
Microsoft.CodeAnalysis.CSharp.EditorFeatures (3)
Formatting\CSharpFormattingInteractionService.cs (1)
100
return Task.FromResult(Formatter.GetFormattedTextChanges(parsedDocument.Root, SpecializedCollections.SingletonEnumerable(formattingSpan), document.Project.Solution.
Services
, options, cancellationToken).ToImmutableArray());
StringCopyPaste\StringCopyPasteCommandHandler.cs (1)
228
var copyPasteService = documentBeforePaste.Project.Solution.
Services
.GetRequiredService<IStringCopyPasteService>();
StringCopyPaste\StringCopyPasteCommandHandler_CutCopy.cs (1)
67
var copyPasteService = document.Project.Solution.
Services
.GetService<IStringCopyPasteService>();
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (3)
CodeActions\Preview\PreviewExceptionTests.cs (1)
118
extensionManager = document.Project.Solution.
Services
.GetService<IExtensionManager>() as EditorLayerExtensionManager.ExtensionManager;
Intents\IntentTestsBase.cs (1)
121
var textDiffService = workspace.CurrentSolution.
Services
.GetRequiredService<IDocumentTextDifferencingService>();
PdbSourceDocument\AbstractPdbSourceDocumentTests.cs (1)
258
var compilationFactory = project.Solution.
Services
.GetRequiredLanguageService<ICompilationFactoryService>(LanguageNames.CSharp);
Microsoft.CodeAnalysis.CSharp.Features (11)
CodeRefactorings\UseExplicitOrImplicitType\AbstractUseTypeCodeRefactoringProvider.cs (1)
127
var editor = new SyntaxEditor(root, document.Project.Solution.
Services
);
Completion\CompletionProviders\SnippetCompletionProvider.cs (2)
126
completionContext, document.Project.Solution.
Services
, semanticModel, isPreProcessorContext: true);
142
completionContext, document.Project.Solution.
Services
, semanticModel, isPreProcessorContext: false);
CSharpInlineDeclarationCodeFixProvider.cs (1)
118
var editor = new SyntaxEditor(currentRoot, document.Project.Solution.
Services
);
CSharpRemoveConfusingSuppressionCodeFixProvider.cs (1)
67
var editor = new SyntaxEditor(root, document.Project.Solution.
Services
);
CSharpUseDeconstructionCodeFixProvider.cs (1)
68
var editor = new SyntaxEditor(root, document.Project.Solution.
Services
);
CSharpUseLocalFunctionCodeFixProvider.cs (1)
117
document.Project.Solution.
Services
, currentRoot,
EmbeddedStatementPlacementCodeFixProvider.cs (1)
51
var editor = new SyntaxEditor(root, document.Project.Solution.
Services
);
Formatting\CSharpAccessibilityModifiersNewDocumentFormattingProvider.cs (1)
42
var editor = new SyntaxEditor(root, document.Project.Solution.
Services
);
MakeLocalFunctionStaticCodeFixHelper.cs (1)
36
var syntaxEditor = new SyntaxEditor(root, document.Project.Solution.
Services
);
ReverseForStatement\CSharpReverseForStatementCodeRefactoringProvider.cs (1)
270
var editor = new SyntaxEditor(root, document.Project.Solution.
Services
);
Microsoft.CodeAnalysis.CSharp.Workspaces (3)
CSharpRemoveUnnecessaryImportsService.cs (1)
78
var provider = document.Project.Solution.
Services
;
CSharpReplaceDiscardDeclarationsWithAssignmentsService.cs (1)
43
var editor = new SyntaxEditor(memberDeclaration, document.Project.Solution.
Services
);
Rename\CSharpRenameRewriterLanguageService.cs (1)
352
var symbols = RenameUtilities.GetSymbolsTouchingPosition(token.Span.Start, _semanticModel, _solution.
Services
, _cancellationToken);
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (2)
Formatting\FormattingTreeEditTests.cs (2)
46
var result1 = Formatter.Format(root1, document.Project.Solution.
Services
, options, CancellationToken.None);
59
var result2 = Formatter.Format(root2, document.Project.Solution.
Services
, options, CancellationToken.None);
Microsoft.CodeAnalysis.EditorFeatures (21)
AddImports\AbstractAddImportsPasteCommandHandler.cs (1)
145
var indicatorFactory = document.Project.Solution.
Services
.GetRequiredService<IBackgroundWorkIndicatorFactory>();
Classification\Semantic\AbstractSemanticOrEmbeddedClassificationViewTaggerProvider.cs (1)
114
var workspaceContextService = document.Project.Solution.
Services
.GetRequiredService<IWorkspaceContextService>();
Classification\Syntactic\SyntacticClassificationTaggerProvider.TagComputer.cs (2)
328
return new(classificationService.ComputeSyntacticChangeRange(currentDocument.Project.Solution.
Services
, previousRoot, currentRoot, _diffTimeout, cancellationToken));
430
classificationService.AddSyntacticClassifications(document.Project.Solution.
Services
, root, span.Span.ToTextSpan(), tempList, cancellationToken);
CommentSelection\AbstractCommentSelectionBase.cs (1)
157
var formattedChanges = Formatter.GetFormattedTextChanges(newRoot, formattingSpans, document.Project.Solution.
Services
, formattingOptions, rules: null, cancellationToken);
EditAndContinue\ActiveStatementTaggerProvider.cs (1)
79
var activeStatementTrackingService = document.Project.Solution.
Services
.GetService<IActiveStatementTrackingService>();
ExternalAccess\IntelliCode\IntentProcessor.cs (1)
133
var textDiffService = changedSolution.
Services
.GetRequiredService<IDocumentTextDifferencingService>();
ExtractMethod\ExtractMethodCommandHandler.cs (3)
127
var indicatorFactory = document.Project.Solution.
Services
.GetRequiredService<IBackgroundWorkIndicatorFactory>();
161
var notificationService = document.Project.Solution.
Services
.GetService<INotificationService>();
240
var notificationService = solution.
Services
.GetService<INotificationService>();
Formatting\FormatCommandHandler.cs (1)
80
var ruleFactory = document.Project.Solution.
Services
.GetRequiredService<IHostDependentFormattingRuleFactoryService>();
Formatting\FormatCommandHandler.Paste.cs (1)
71
var services = solution.
Services
;
GoToDefinition\AbstractGoToCommandHandler`2.cs (1)
262
var service = document.Project.Solution.
Services
.GetRequiredService<IWorkspaceStatusService>();
GoToDefinition\GoToDefinitionCommandHandler.cs (2)
160
var notificationService = document.Project.Solution.
Services
.GetRequiredService<INotificationService>();
170
var indicatorFactory = document.Project.Solution.
Services
.GetRequiredService<IBackgroundWorkIndicatorFactory>();
GoToDefinition\GoToDefinitionHelpers.cs (1)
59
var factory = solution.
Services
.GetService<IDefinitionsAndReferencesFactory>();
InlineRename\InlineRenameSession.OpenTextBufferManager.cs (2)
573
var textDiffService = oldDocument.Project.Solution.
Services
.GetService<IDocumentTextDifferencingService>();
591
var textDiffService = preMergeDocument.Project.Solution.
Services
.GetService<IDocumentTextDifferencingService>();
Interactive\InteractiveSession.cs (1)
237
new WorkspaceFileTextLoader(solution.
Services
, initializationScriptPath, defaultEncoding: null));
RenameTracking\RenameTrackingTaggerProvider.RenameTrackingCodeAction.cs (1)
93
_document.Project.Solution.
Services
.GetService<INotificationService>()
Shared\Extensions\ITextSnapshotExtensions.cs (1)
78
var service = document.Project.Solution.
Services
.GetService<IWorkspaceStatusService>();
Microsoft.CodeAnalysis.EditorFeatures.Cocoa (2)
Controller.cs (1)
134
_providers = document.Project.Solution.
Services
.SelectMatchingExtensionValues(
NavigableSymbolService.NavigableSymbolSource.cs (1)
57
var indicatorFactory = document.Project.Solution.
Services
.GetRequiredService<IBackgroundWorkIndicatorFactory>();
Microsoft.CodeAnalysis.EditorFeatures.DiagnosticsTests.Utilities (1)
ChangeSignature\ChangeSignatureTestState.cs (1)
75
return (TestChangeSignatureOptionsService)InvocationDocument.Project.Solution.
Services
.GetRequiredService<IChangeSignatureOptionsService>();
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (3)
Diagnostics\GenerateType\GenerateTypeTestState.cs (2)
69
return (TestGenerateTypeOptionsService)InvocationDocument.Project.Solution.
Services
.GetRequiredService<IGenerateTypeOptionsService>();
77
return (TestProjectManagementService)InvocationDocument.Project.Solution.
Services
.GetService<IProjectManagementService>();
ExtractInterface\ExtractInterfaceTestState.cs (1)
75
return (TestExtractInterfaceOptionsService)ExtractFromDocument.Project.Solution.
Services
.GetService<IExtractInterfaceOptionsService>();
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (19)
CodeFixes\CodeFixServiceTests.cs (1)
373
extensionManager = (EditorLayerExtensionManager.ExtensionManager)document.Project.Solution.
Services
.GetRequiredService<IExtensionManager>();
CodeRefactorings\CodeRefactoringServiceTest.cs (1)
117
var extensionManager = (EditorLayerExtensionManager.ExtensionManager)document.Project.Solution.
Services
.GetRequiredService<IExtensionManager>();
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (8)
536
loader: new WorkspaceFileTextLoader(solution.
Services
, sourceFileA.Path, encodingA),
543
loader: new WorkspaceFileTextLoader(solution.
Services
, sourceFileB.Path, encodingB),
550
loader: new WorkspaceFileTextLoader(solution.
Services
, sourceFileC.Path, encodingC),
557
loader: new WorkspaceFileTextLoader(solution.
Services
, sourceFileE.Path, encodingE),
597
solution = solution.WithDocumentTextLoader(documentIdB, new WorkspaceFileTextLoader(solution.
Services
, sourceFileB.Path, encodingB), PreservationMode.PreserveValue);
4480
loader: new WorkspaceFileTextLoader(solution.
Services
, sourceFileA.Path, Encoding.UTF8),
4567
loader: new WorkspaceFileTextLoader(solution.
Services
, sourceFileA.Path, Encoding.UTF8),
4634
loader: new WorkspaceFileTextLoader(solution.
Services
, sourceFileA.Path, Encoding.UTF8),
FindSymbols\SymbolTreeInfoTests.cs (8)
38
Assert.Equal(info1.Checksum, SymbolTreeInfo.GetMetadataChecksum(solution.
Services
, reference1, CancellationToken.None));
39
Assert.Equal(info2.Checksum, SymbolTreeInfo.GetMetadataChecksum(solution.
Services
, reference2, CancellationToken.None));
52
var checksum1 = SymbolTreeInfo.GetMetadataChecksum(solution.
Services
, reference1, CancellationToken.None);
56
var checksum2 = SymbolTreeInfo.GetMetadataChecksum(solution.
Services
, reference2, CancellationToken.None);
75
var checksum1 = SymbolTreeInfo.GetMetadataChecksum(solution.
Services
, reference1, CancellationToken.None);
84
Assert.Equal(info2.Checksum, SymbolTreeInfo.GetMetadataChecksum(solution.
Services
, reference2, CancellationToken.None));
100
var checksum2 = SymbolTreeInfo.GetMetadataChecksum(solution.
Services
, reference2, CancellationToken.None);
105
Assert.Equal(info1.Checksum, SymbolTreeInfo.GetMetadataChecksum(solution.
Services
, reference1, CancellationToken.None));
SolutionCrawler\WorkCoordinatorTests.cs (1)
1673
var documentTrackingService = (TestDocumentTrackingService)document.Project.Solution.
Services
.GetRequiredService<IDocumentTrackingService>();
Microsoft.CodeAnalysis.EditorFeatures.Wpf (5)
NavigableSymbols\NavigableSymbolService.NavigableSymbolSource.cs (1)
57
var indicatorFactory = document.Project.Solution.
Services
.GetRequiredService<IBackgroundWorkIndicatorFactory>();
Peek\PeekableItemFactory.cs (1)
74
var symbolNavigationService = solution.
Services
.GetService<ISymbolNavigationService>();
Peek\PeekableItemSource.cs (1)
76
var services = document.Project.Solution.
Services
;
QuickInfo\Extensions.cs (1)
39
var cloneServices = document.Project.Solution.
Services
.ExportProvider.GetExports<ITextBufferCloneService>();
SignatureHelp\Controller.cs (1)
134
_providers = document.Project.Solution.
Services
.SelectMatchingExtensionValues(
Microsoft.CodeAnalysis.ExternalAccess.OmniSharp (1)
Analyzers\OmniSharpWorkspaceAnalyzerOptionsFactory.cs (1)
12
=> new WorkspaceAnalyzerOptions(options, IdeAnalyzerOptions.GetDefault(solution.
Services
.GetLanguageServices(LanguageNames.CSharp)));
Microsoft.CodeAnalysis.ExternalAccess.Razor (2)
RazorClassifierAccessor.cs (1)
20
document.Project.Solution.
Services
, document.Project, semanticModel, textSpan, options.UnderlyingObject, cancellationToken);
RazorSpanMappingServiceWrapper.cs (1)
36
var diffService = newDocument.Project.Solution.
Services
.GetRequiredService<IDocumentTextDifferencingService>();
Microsoft.CodeAnalysis.Features (123)
AbstractChangeNamespaceToMatchFolderCodeFixProvider.cs (1)
27
var service = context.Document.Project.Solution.
Services
.GetRequiredService<ISupportedChangesService>();
AbstractMakeMethodSynchronousCodeFixProvider.cs (1)
177
var editor = new SyntaxEditor(root, currentSolution.
Services
);
AbstractRemoveAsyncModifierCodeFixProvider.cs (1)
67
var solutionServices = document.Project.Solution.
Services
;
AbstractRemoveUnusedValuesCodeFixProvider.cs (2)
292
var editor = new SyntaxEditor(root, document.Project.Solution.
Services
);
842
var provider = document.Project.Solution.
Services
;
AbstractUnsealClassCodeFixProvider.cs (1)
66
var editor = new SyntaxEditor(root, document.Project.Solution.
Services
);
AbstractUseCollectionInitializerCodeFixProvider.cs (1)
99
var subEditor = new SyntaxEditor(currentRoot, document.Project.Solution.
Services
);
AbstractUseConditionalExpressionCodeFixProvider.cs (2)
62
var nestedEditor = new SyntaxEditor(root, document.Project.Solution.
Services
);
80
var provider = document.Project.Solution.
Services
;
AbstractUseObjectInitializerCodeFixProvider.cs (1)
100
var subEditor = new SyntaxEditor(currentRoot, document.Project.Solution.
Services
);
AddConstructorParametersFromMembers\AddConstructorParametersFromMembersCodeRefactoringProvider.AddConstructorParametersCodeAction.cs (1)
55
var services = _document.Project.Solution.
Services
;
AddDebuggerDisplay\AbstractAddDebuggerDisplayCodeRefactoringProvider.cs (1)
118
var editor = new SyntaxEditor(syntaxRoot, document.Project.Solution.
Services
);
AddImport\AbstractAddImportCodeFixProvider.cs (1)
57
var services = document.Project.Solution.
Services
;
AddImport\SearchScopes\MetadataSymbolsSearchScope.cs (1)
50
var service = _assemblyProject.Solution.
Services
.GetService<ISymbolTreeInfoCacheService>();
AddImport\SearchScopes\SourceSymbolsProjectSearchScope.cs (1)
38
var service = _project.Solution.
Services
.GetRequiredService<ISymbolTreeInfoCacheService>();
AddMissingReference\AddMissingReferenceCodeAction.cs (1)
95
var factoryService = _project.Solution.
Services
.GetRequiredService<IAddMetadataReferenceCodeActionOperationFactoryWorkspaceService>();
AddPackage\AbstractAddPackageCodeFixProvider.cs (1)
47
var workspaceServices = document.Project.Solution.
Services
;
AddParameterService.cs (1)
107
var editor = new SyntaxEditor(syntaxRoot, solution.
Services
);
ChangeSignature\AbstractChangeSignatureService.cs (2)
218
var changeSignatureOptionsService = succeededContext.Solution.
Services
.GetRequiredService<IChangeSignatureOptionsService>();
409
doc.Project.Solution.
Services
,
CodeFixes\Configuration\ConfigurationUpdater.cs (1)
288
var service = _project.Solution.
Services
.GetService<IAddSolutionItemService>();
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.GlobalSuppressMessageCodeAction.cs (1)
41
var services = suppressionsDoc.Project.Solution.
Services
;
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.GlobalSuppressMessageFixAllCodeAction.cs (1)
139
var services = suppressionsDoc.Project.Solution.
Services
;
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.PragmaWarningCodeAction.cs (1)
87
=> Formatter.Format(node, _document.Project.Solution.
Services
, _options, cancellationToken);
CodeFixes\Suppression\AbstractSuppressionCodeFixProvider.RemoveSuppressionCodeAction_Pragma.cs (1)
221
=> Formatter.Format(node, _document.Project.Solution.
Services
, _options, cancellationToken);
CodeFixesAndRefactorings\AbstractFixAllCodeAction.cs (2)
65
var service = FixAllState.Project.Solution.
Services
.GetRequiredService<IFixAllGetFixesService>();
79
var service = FixAllState.Project.Solution.
Services
.GetRequiredService<IFixAllGetFixesService>();
CodeRefactorings\AddMissingImports\AbstractAddMissingImportsFeatureService.cs (4)
58
var symbolSearchService = solution.
Services
.GetRequiredService<ISymbolSearchService>();
94
var textDiffingService = solution.
Services
.GetRequiredService<IDocumentTextDifferencingService>();
95
var packageInstallerService = solution.
Services
.GetService<IPackageInstallerService>();
166
var services = document.Project.Solution.
Services
;
CodeRefactorings\CodeRefactoringService.cs (2)
98
var extensionManager = document.Project.Solution.
Services
.GetRequiredService<IExtensionManager>();
128
var extensionManager = document.Project.Solution.
Services
.GetRequiredService<IExtensionManager>();
CodeRefactorings\ExtractMethod\AbstractExtractMethodCodeRefactoringProvider.cs (1)
49
var activeInlineRenameSession = solution.
Services
.GetService<ICodeRefactoringHelpersService>().ActiveInlineRenameSession;
CodeRefactorings\SyncNamespace\AbstractChangeNamespaceService.cs (1)
631
var services = documentWithAddedImports.Project.Solution.
Services
;
Completion\CompletionOptions.cs (1)
70
var documentSupportsFeatureService = solution.
Services
.GetRequiredService<IDocumentSupportsFeatureService>();
Completion\Providers\AbstractMemberInsertingCompletionProvider.cs (1)
41
var globalOptions = document.Project.Solution.
Services
.GetService<ILegacyGlobalCleanCodeGenerationOptionsWorkspaceService>();
Completion\Providers\ImportCompletionProvider\AbstractImportCompletionProvider.cs (2)
133
var globalOptions = document.Project.Solution.
Services
.GetService<ILegacyGlobalCleanCodeGenerationOptionsWorkspaceService>();
227
var documentSupportsFeatureService = solution.
Services
.GetRequiredService<IDocumentSupportsFeatureService>();
Completion\Providers\ImportCompletionProvider\AbstractTypeImportCompletionService.cs (1)
200
checksum: SymbolTreeInfo.GetMetadataChecksum(solution.
Services
, peReference, cancellationToken),
Completion\Providers\ImportCompletionProvider\ExtensionMethodImportCompletionHelper.SymbolComputer.cs (1)
67
=> project.Solution.
Services
.GetRequiredService<IImportCompletionCacheService<ExtensionMethodImportCompletionCacheEntry, object>>();
Completion\Providers\ImportCompletionProvider\ImportCompletionItem.cs (1)
140
document.Project.Solution.
Services
,
Completion\Providers\SymbolCompletionItem.cs (2)
197
var services = document.Project.Solution.
Services
;
362
return await CommonCompletionUtilities.CreateDescriptionAsync(document.Project.Solution.
Services
, semanticModel, position, symbols, options, supportedPlatforms, cancellationToken).ConfigureAwait(false);
ConvertAutoPropertyToFullProperty\AbstractConvertAutoPropertyToFullPropertyCodeRefactoringProvider.cs (1)
84
var editor = new SyntaxEditor(root, document.Project.Solution.
Services
);
ConvertForEachToFor\AbstractConvertForEachToForCodeRefactoringProvider.cs (1)
419
var services = document.Project.Solution.
Services
;
ConvertLinq\ConvertForEachToLinqQuery\AbstractConvertForEachToLinqQueryProvider.cs (1)
151
var editor = new SyntaxEditor(converter.ForEachInfo.SemanticModel.SyntaxTree.GetRoot(cancellationToken), document.Project.Solution.
Services
);
ConvertTupleToStruct\AbstractConvertTupleToStructCodeRefactoringProvider.cs (2)
215
var client = await RemoteHostClient.TryGetClientAsync(solution.
Services
, cancellationToken).ConfigureAwait(false);
221
callbackTarget: new RemoteOptionsProvider<CleanCodeGenerationOptions>(solution.
Services
, fallbackOptions),
DocumentHighlighting\AbstractDocumentHighlightsService.cs (1)
74
semanticModel, position, solution.
Services
, cancellationToken).ConfigureAwait(false);
EncapsulateField\AbstractEncapsulateFieldService.cs (2)
113
var client = await RemoteHostClient.TryGetClientAsync(solution.
Services
, cancellationToken).ConfigureAwait(false);
121
callbackTarget: new RemoteOptionsProvider<CleanCodeGenerationOptions>(solution.
Services
, fallbackOptions),
ExternalAccess\UnitTesting\API\UnitTestingSearchHelpers.cs (2)
32
var client = await RemoteHostClient.TryGetClientAsync(project.Solution.
Services
, cancellationToken).ConfigureAwait(false);
55
var client = await RemoteHostClient.TryGetClientAsync(project.Solution.
Services
, cancellationToken).ConfigureAwait(false);
ExternalAccess\UnitTesting\LegacySolutionEvents\UnitTestingLegacySolutionEventsListener.cs (1)
32
var service = solution.
Services
.GetService<IUnitTestingSolutionCrawlerRegistrationService>();
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingSolutionCrawlerRegistrationService.cs (1)
59
var solutionServices = solution.
Services
;
ExtractClass\AbstractExtractClassRefactoringProvider.cs (1)
43
var optionsService = _optionsService ?? solution.
Services
.GetService<IExtractClassOptionsService>();
ExtractClass\ExtractClassWithDialogCodeAction.cs (1)
66
var extractClassService = _service ?? _document.Project.Solution.
Services
.GetRequiredService<IExtractClassOptionsService>();
ExtractInterface\AbstractExtractInterfaceService.cs (3)
275
var notificationService = document.Project.Solution.
Services
.GetService<INotificationService>();
279
var service = document.Project.Solution.
Services
.GetService<IExtractInterfaceOptionsService>();
346
var editor = new SyntaxEditor(currentRoot, solution.
Services
);
ExtractMethod\ExtractMethodResult.cs (1)
98
var services = DocumentWithoutFinalFormatting.Project.Solution.
Services
;
FindUsages\AbstractFindUsagesService_FindImplementations.cs (1)
44
var client = await RemoteHostClient.TryGetClientAsync(solution.
Services
, cancellationToken).ConfigureAwait(false);
FindUsages\AbstractFindUsagesService_FindReferences.cs (2)
76
var factory = solution.
Services
.GetRequiredService<IDefinitionsAndReferencesFactory>();
136
var client = await RemoteHostClient.TryGetClientAsync(solution.
Services
, cancellationToken).ConfigureAwait(false);
FindUsages\FindUsagesHelpers.cs (1)
43
var mappingService = document.Project.Solution.
Services
.GetService<ISymbolMappingService>();
GenerateConstructorFromMembers\AbstractGenerateConstructorFromMembersCodeRefactoringProvider.ConstructorDelegatingCodeAction.cs (1)
52
var languageServices = project.Solution.
Services
.GetLanguageServices(_state.ContainingType.Language);
GenerateConstructorFromMembers\AbstractGenerateConstructorFromMembersCodeRefactoringProvider.cs (1)
234
var globalOptions = document.Project.Solution.
Services
.GetRequiredService<ILegacyGlobalOptionsWorkspaceService>();
GenerateConstructorFromMembers\AbstractGenerateConstructorFromMembersCodeRefactoringProvider.GenerateConstructorWithDialogCodeAction.cs (2)
60
var service = _service._pickMembersService_forTesting ?? _document.Project.Solution.
Services
.GetRequiredService<IPickMembersService>();
82
var globalOptions = _document.Project.Solution.
Services
.GetRequiredService<ILegacyGlobalOptionsWorkspaceService>();
GenerateDefaultConstructors\AbstractGenerateDefaultConstructorsService.State.cs (1)
79
var destinationProvider = semanticDocument.Project.Solution.
Services
.GetLanguageServices(ClassType.Language);
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersCodeRefactoringProvider.cs (2)
262
var globalOptions = document.Project.Solution.
Services
.GetRequiredService<ILegacyGlobalOptionsWorkspaceService>();
277
var globalOptions = document.Project.Solution.
Services
.GetRequiredService<ILegacyGlobalOptionsWorkspaceService>();
GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndHashWithDialogCodeAction.cs (2)
59
var service = _service._pickMembersService_forTestingPurposes ?? _document.Project.Solution.
Services
.GetRequiredService<IPickMembersService>();
79
var globalOptions = solution.
Services
.GetRequiredService<ILegacyGlobalOptionsWorkspaceService>();
GenerateMember\GenerateConstructor\AbstractGenerateConstructorService.State.cs (4)
242
var syntaxFacts = _document.Project.Solution.
Services
.GetRequiredLanguageService<ISyntaxFactsService>(TypeToGenerateIn.Language);
582
var provider = document.Project.Solution.
Services
.GetLanguageServices(TypeToGenerateIn.Language);
617
var provider = document.Project.Solution.
Services
.GetLanguageServices(TypeToGenerateIn.Language);
640
var provider = document.Project.Solution.
Services
.GetLanguageServices(TypeToGenerateIn.Language);
GenerateMember\GenerateEnumMember\AbstractGenerateEnumMemberService.CodeAction.cs (1)
36
var languageServices = _document.Project.Solution.
Services
.GetLanguageServices(_state.TypeToGenerateIn.Language);
GenerateMember\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.CodeAction.cs (1)
70
var syntaxFactory = _document.Project.Solution.
Services
.GetLanguageServices(_state.TypeToGenerateIn.Language).GetService<SyntaxGenerator>();
GenerateMember\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.cs (1)
57
var semanticFacts = document.Project.Solution.
Services
.GetLanguageServices(state.TypeToGenerateIn.Language).GetService<ISemanticFactsService>();
GenerateMember\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.SignatureInfo.cs (1)
125
var languageServiceProvider = Document.Project.Solution.
Services
.GetLanguageServices(State.TypeToGenerateIn.Language);
GenerateMember\GenerateParameterizedMember\AbstractGenerateParameterizedMemberService.State.cs (1)
83
var destinationProvider = document.Project.Solution.
Services
.GetLanguageServices(TypeToGenerateIn.Language);
GenerateMember\GenerateVariable\AbstractGenerateVariableService.CodeAction.cs (1)
114
var syntaxFactory = _semanticDocument.Project.Solution.
Services
.GetLanguageServices(_state.TypeToGenerateIn.Language).GetService<SyntaxGenerator>();
GenerateOverrides\GenerateOverridesWithDialogCodeAction.cs (1)
51
var services = _document.Project.Solution.
Services
;
GenerateType\AbstractGenerateTypeService.CodeAction.cs (3)
104
var generateTypeOptionsService = _document.Project.Solution.
Services
.GetRequiredService<IGenerateTypeOptionsService>();
105
var notificationService = _document.Project.Solution.
Services
.GetService<INotificationService>();
106
var projectManagementService = _document.Project.Solution.
Services
.GetService<IProjectManagementService>();
GoToDefinition\AbstractGoToDefinitionSymbolService.cs (1)
26
var services = document.Project.Solution.
Services
;
InheritanceMargin\AbstractInheritanceMarginService.cs (1)
50
var remoteClient = await RemoteHostClient.TryGetClientAsync(solution.
Services
, cancellationToken).ConfigureAwait(false);
InheritanceMargin\AbstractInheritanceMarginService_Helpers.cs (1)
90
var mappingService = document.Project.Solution.
Services
.GetRequiredService<ISymbolMappingService>();
InitializeParameter\AbstractAddParameterCheckCodeRefactoringProvider.cs (1)
363
var editor = new SyntaxEditor(root, document.Project.Solution.
Services
);
InitializeParameter\AbstractInitializeMemberFromParameterCodeRefactoringProviderMemberCreation.cs (1)
453
var services = document.Project.Solution.
Services
;
InlineHints\AbstractInlineParameterNameHintsService.cs (1)
47
var globalOptions = document.Project.Solution.
Services
.GetRequiredService<ILegacyGlobalOptionsWorkspaceService>();
InlineHints\AbstractInlineTypeHintsService.cs (1)
43
var globalOptions = document.Project.Solution.
Services
.GetRequiredService<ILegacyGlobalOptionsWorkspaceService>();
InvertConditional\AbstractInvertConditionalCodeRefactoringProvider.cs (1)
49
var editor = new SyntaxEditor(root, document.Project.Solution.
Services
);
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (2)
111
var (temporaryProjectInfo, temporaryDocumentId) = fileInfo.GetProjectInfoAndDocumentId(metadataSolution.
Services
, loadFileFromDisk: false);
242
var (temporaryProjectInfo, temporaryDocumentId) = fileInfo.GetProjectInfoAndDocumentId(solution.
Services
, loadFileFromDisk: true);
MetadataAsSource\MetadataAsSourceGeneratedFileInfo.cs (1)
38
: sourceProject.Solution.
Services
.GetLanguageServices(LanguageName).GetRequiredService<ISyntaxTreeFactoryService>().GetDefaultParseOptionsWithLatestLanguageVersion();
MoveStaticMembers\AbstractMoveStaticMembersRefactoringProvider.cs (1)
26
var service = document.Project.Solution.
Services
.GetService<IMoveStaticMembersOptionsService>();
MoveToNamespace\AbstractMoveToNamespaceCodeAction.cs (1)
78
var symbolRenameCodeActionOperationFactory = moveToNamespaceResult.UpdatedSolution.
Services
.GetService<ISymbolRenamedCodeActionOperationFactoryWorkspaceService>();
NamingStyleCodeFixProvider.cs (1)
166
var factory = _startingSolution.
Services
.GetRequiredService<ISymbolRenamedCodeActionOperationFactoryWorkspaceService>();
NavigateTo\AbstractNavigateToSearchService.CachedDocumentSearch.cs (1)
82
var storageService = solution.
Services
.GetPersistentStorageService();
NavigateTo\INavigateToSearcherHost.cs (2)
59
var service = _solution.
Services
.GetRequiredService<IWorkspaceStatusService>();
105
var client = await RemoteHostClient.TryGetClientAsync(_solution.
Services
, _disposalToken).ConfigureAwait(false);
NavigateTo\NavigateToSearcher.cs (1)
63
var docTrackingService = _solution.
Services
.GetRequiredService<IDocumentTrackingService>();
PullMemberUp\AbstractPullMemberUpRefactoringProvider.cs (1)
37
_service ??= document.Project.Solution.
Services
.GetService<IPullMemberUpOptionsService>();
QuickInfo\CommonSemanticQuickInfoProvider.cs (3)
31
var services = context.Document.Project.Solution.
Services
;
59
var services = document.Project.Solution.
Services
;
82
var services = solution.
Services
;
Rename\SymbolicRenameInfo.cs (1)
175
semanticModel, triggerToken.SpanStart, document.Project.Solution.
Services
, cancellationToken: cancellationToken).ConfigureAwait(false);
ReplaceMethodWithProperty\ReplaceMethodWithPropertyCodeRefactoringProvider.cs (2)
224
var editor = new SyntaxEditor(root, originalDocument.Project.Solution.
Services
);
369
var editor = new SyntaxEditor(root, updatedSolution.
Services
);
ReplacePropertyWithMethods\ReplacePropertyWithMethodsCodeRefactoringProvider.cs (2)
228
var editor = new SyntaxEditor(root, originalDocument.Project.Solution.
Services
);
364
var editor = new SyntaxEditor(root, updatedSolution.
Services
);
Shared\Utilities\ExtractTypeHelpers.cs (2)
33
var editor = new SyntaxEditor(originalRoot, symbolMapping.AnnotatedSolution.
Services
);
129
return Formatter.Format(syntaxGenerator.SyntaxGeneratorInternal.TypeParameterList(typeParameterNames), document.Project.Solution.
Services
, formattingOptions, cancellationToken).ToString();
StackTraceExplorer\StackTraceExplorerService.cs (1)
52
var client = await RemoteHostClient.TryGetClientAsync(solution.
Services
, cancellationToken).ConfigureAwait(false);
UnusedReferences\UnusedReferencesRemover.cs (1)
273
var referenceCleanupService = solution.
Services
.GetRequiredService<IReferenceCleanupService>();
UseAutoProperty\AbstractUseAutoPropertyCodeFixProvider.cs (2)
209
var editor = new SyntaxEditor(declaratorTreeRoot, fieldDocument.Project.Solution.
Services
);
288
return Formatter.Format(newRoot, SpecializedFormattingAnnotation, document.Project.Solution.
Services
, options, formattingRules, cancellationToken);
Workspace\BackgroundCompiler.cs (1)
99
var trackingService = solution.
Services
.GetRequiredService<IDocumentTrackingService>();
Microsoft.CodeAnalysis.LanguageServer.Protocol (25)
Features\CodeCleanup\AbstractCodeCleanupService.cs (1)
185
var fixAllService = document.Project.Solution.
Services
.GetRequiredService<IFixAllGetFixesService>();
Features\CodeFixes\CodeFixService.cs (8)
106
var buildOnlyDiagnosticsService = document.Project.Solution.
Services
.GetRequiredService<IBuildOnlyDiagnosticsService>();
183
var buildOnlyDiagnosticsService = document.Project.Solution.
Services
.GetRequiredService<IBuildOnlyDiagnosticsService>();
311
var fixAllService = document.Project.Solution.
Services
.GetRequiredService<IFixAllGetFixesService>();
324
var workspaceFixersMap = GetFixerPerLanguageMap(document.Project.Solution.
Services
);
350
var fixersPriorityByLanguageMap = GetFixerPriorityPerLanguageMap(document.Project.Solution.
Services
);
460
var extensionManager = document.Project.Solution.
Services
.GetService<IExtensionManager>();
710
var extensionManager = textDocument.Project.Solution.
Services
.GetRequiredService<IExtensionManager>();
925
var extensionManager = document.Project.Solution.
Services
.GetService<IExtensionManager>();
Features\Diagnostics\DocumentAnalysisExecutor.cs (1)
378
var diagnosticSpanMappingService = textDocument.Project.Solution.
Services
.GetService<IWorkspaceVenusSpanMappingService>();
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer.ProjectState.cs (1)
209
&& project.Solution.
Services
.GetService<ISolutionCrawlerOptionsService>()?.EnableDiagnosticsInSourceGeneratedFiles == true)
Features\Diagnostics\EngineV2\DiagnosticIncrementalAnalyzer_IncrementalAnalyzer.cs (1)
567
&& project.Solution.
Services
.GetService<ISolutionCrawlerOptionsService>()?.EnableDiagnosticsInSourceGeneratedFiles == true)
Handler\CodeActions\CodeActionResolveHandler.cs (1)
91
var textDiffService = solution.
Services
.GetService<IDocumentTextDifferencingService>();
Handler\CodeLens\CodeLensResolveHandler.cs (1)
54
var codeLensReferencesService = document.Project.Solution.
Services
.GetRequiredService<ICodeLensReferencesService>();
Handler\Completion\CompletionHandler.cs (1)
171
var creationService = document.Project.Solution.
Services
.GetRequiredService<ILspCompletionResultCreationService>();
Handler\Diagnostics\WorkspacePullDiagnosticHandler.cs (2)
102
var documentTrackingService = solution.
Services
.GetRequiredService<IDocumentTrackingService>();
170
var enableDiagnosticsInSourceGeneratedFiles = solution.
Services
.GetService<ISolutionCrawlerOptionsService>()?.EnableDiagnosticsInSourceGeneratedFiles == true;
Handler\Formatting\AbstractFormatDocumentHandlerBase.cs (1)
44
var services = document.Project.Solution.
Services
;
Handler\Hover\HoverHandler.cs (1)
66
var hoverService = document.Project.Solution.
Services
.GetRequiredService<ILspHoverResultCreationService>();
Handler\InlineCompletions\InlineCompletionsHandler.cs (1)
149
var formattingChanges = Formatter.GetFormattedTextChanges(root, spanToFormat, originalDocument.Project.Solution.
Services
, formattingOptions, cancellationToken: cancellationToken)
Handler\PullHandlers\VersionedPullCache`2.cs (1)
129
var workspaceStatusService = solution.
Services
.GetRequiredService<IWorkspaceStatusService>();
Handler\Rename\RenameHandler.cs (1)
85
var textDiffService = renamedSolution.
Services
.GetRequiredService<IDocumentTextDifferencingService>();
Handler\SpellCheck\WorkspaceSpellCheckHandler.cs (1)
39
var documentTrackingService = solution.
Services
.GetRequiredService<IDocumentTrackingService>();
Handler\Symbols\DocumentSymbolsHandler.cs (1)
86
var service = document.Project.Solution.
Services
.GetRequiredService<ILspSymbolInformationCreationService>();
Handler\Symbols\WorkspaceSymbolsHandler.cs (1)
93
var service = project.Solution.
Services
.GetRequiredService<ILspSymbolInformationCreationService>();
Microsoft.CodeAnalysis.Remote.ServiceHub (4)
Services\DesignerAttributeDiscovery\RemoteDesignerAttributeDiscoveryService.cs (1)
56
var service = solution.
Services
.GetRequiredService<IDesignerAttributeDiscoveryService>();
Services\DiagnosticAnalyzer\DiagnosticComputer.cs (1)
76
_performanceTracker = project.Solution.
Services
.GetService<IPerformanceTrackerService>();
Services\LegacySolutionEvents\RemoteLegacySolutionEventsAggregationService.cs (1)
51
var aggregationService = oldSolution.
Services
.GetRequiredService<ILegacySolutionEventsAggregationService>();
Services\SemanticClassification\RemoteSemanticClassificationService.Caching.cs (1)
113
var persistenceService = solution.
Services
.GetPersistentStorageService();
Microsoft.CodeAnalysis.VisualBasic.CodeStyle.Fixes (2)
VisualBasicRemoveUnnecessaryCastCodeFixProvider.vb (2)
103
Dim innerEditor = New SyntaxEditor(root, document.Project.Solution.
Services
)
137
Dim editor = New SyntaxEditor(root, document.Project.Solution.
Services
)
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures (2)
LineCommit\CommitCommandHandler.vb (1)
243
Dim formattingRuleService = document.Project.Solution.
Services
.GetService(Of IHostDependentFormattingRuleFactoryService)()
LineCommit\CommitFormatter.vb (1)
108
document.Project.Solution.
Services
,
Microsoft.CodeAnalysis.VisualBasic.Features (9)
CodeFixes\GenerateEvent\GenerateEventCodeFixProvider.vb (4)
128
Dim codeGenService = document.Project.Solution.
Services
.GetLanguageServices(targetType.Language).GetService(Of ICodeGenerationService)
129
Dim syntaxFactService = document.Project.Solution.
Services
.GetLanguageServices(targetType.Language).GetService(Of ISyntaxFactsService)
270
Dim codeGenService = document.Project.Solution.
Services
.GetLanguageServices(targetType.Language).GetService(Of ICodeGenerationService)
380
Dim codeGenService = document.Project.Solution.
Services
.GetLanguageServices(originalTargetType.Language).GetService(Of ICodeGenerationService)
CodeFixes\OverloadBase\OverloadBaseCodeFixProvider.AddKeywordAction.vb (1)
77
Dim services = document.Project.Solution.
Services
CodeRefactorings\InlineTemporary\VisualBasicInlineTemporaryCodeRefactoringProvider.vb (1)
185
Return Simplifier.Expand(DirectCast(n, StatementSyntax), semanticModel, document.Project.Solution.
Services
, cancellationToken:=cancellationToken)
QuickInfo\VisualBasicSemanticQuickInfoProvider.vb (1)
31
Dim services = context.Document.Project.Solution.
Services
VisualBasicRemoveUnnecessaryCastCodeFixProvider.vb (2)
103
Dim innerEditor = New SyntaxEditor(root, document.Project.Solution.
Services
)
137
Dim editor = New SyntaxEditor(root, document.Project.Solution.
Services
)
Microsoft.CodeAnalysis.VisualBasic.Workspaces (3)
CodeCleanup\Providers\NormalizeModifiersOrOperatorsCodeCleanupProvider.vb (1)
37
Dim newRoot = Await CleanupAsync(root, spans, options.FormattingOptions, document.Project.Solution.
Services
, cancellationToken).ConfigureAwait(False)
CodeCleanup\Providers\RemoveUnnecessaryLineContinuationCodeCleanupProvider.vb (1)
40
Dim newRoot = Await CleanupAsync(root, spans, options.FormattingOptions, document.Project.Solution.
Services
, cancellationToken).ConfigureAwait(False)
Rename\VisualBasicRenameRewriterLanguageService.vb (1)
304
Dim symbols = RenameUtilities.GetSymbolsTouchingPosition(token.Span.Start, _semanticModel, _solution.
Services
, _cancellationToken)
Microsoft.CodeAnalysis.Workspaces (66)
AbstractMoveDeclarationNearReferenceService.cs (1)
83
var editor = new SyntaxEditor(root, document.Project.Solution.
Services
);
Classification\AbstractClassificationService.cs (3)
99
var workspaceStatusService = document.Project.Solution.
Services
.GetRequiredService<IWorkspaceStatusService>();
154
var extensionManager = document.Project.Solution.
Services
.GetRequiredService<IExtensionManager>();
188
AddSyntacticClassifications(document.Project.Solution.
Services
, root, textSpan, result, cancellationToken);
Classification\Classifier.cs (1)
31
return GetClassifiedSpans(document.Project.Solution.
Services
, document.Project, semanticModel, textSpan, ClassificationOptions.Default, cancellationToken);
CodeActions\CodeAction.cs (1)
355
var globalOptions = document.Project.Solution.
Services
.GetService<ILegacyGlobalCleanCodeGenerationOptionsWorkspaceService>();
CodeFixes\FixAllOccurrences\TextChangeMerger.cs (1)
36
_differenceService = document.Project.Solution.
Services
.GetRequiredService<IDocumentTextDifferencingService>();
CodeGenerator.cs (10)
31
=> GetCodeGenerationService(context.Solution.
Services
, destination.Language).AddEventAsync(context, destination, @event, cancellationToken);
38
=> GetCodeGenerationService(context.Solution.
Services
, destination.Language).AddFieldAsync(context, destination, field, cancellationToken);
45
=> GetCodeGenerationService(context.Solution.
Services
, destination.Language).AddMethodAsync(context, destination, method, cancellationToken);
52
=> GetCodeGenerationService(context.Solution.
Services
, destination.Language).AddPropertyAsync(context, destination, property, cancellationToken);
59
=> GetCodeGenerationService(context.Solution.
Services
, destination.Language).AddNamedTypeAsync(context, destination, namedType, cancellationToken);
66
=> GetCodeGenerationService(context.Solution.
Services
, destination.Language).AddNamedTypeAsync(context, destination, namedType, cancellationToken);
73
=> GetCodeGenerationService(context.Solution.
Services
, destination.Language).AddNamespaceAsync(context, destination, @namespace, cancellationToken);
80
=> GetCodeGenerationService(context.Solution.
Services
, destination.Language).AddNamespaceOrTypeAsync(context, destination, namespaceOrType, cancellationToken);
87
=> GetCodeGenerationService(context.Solution.
Services
, destination.Language).AddMembersAsync(context, destination, members, cancellationToken);
93
=> GetCodeGenerationService(solution.
Services
, destination.Language).CanAddTo(destination, solution, cancellationToken);
CodeRefactorings\SyntaxEditorBasedCodeRefactoringProvider.cs (1)
75
var editor = new SyntaxEditor(root, document.Project.Solution.
Services
);
Diagnostics\DiagnosticData.cs (1)
201
var diagnosticSpanMappingService = document?.Project.Solution.
Services
.GetService<IWorkspaceVenusSpanMappingService>();
DocumentExtensions.cs (1)
144
var semanticModelService = document.Project.Solution.
Services
.GetRequiredService<ISemanticModelReuseWorkspaceService>();
Editing\DocumentEditor.cs (1)
22
: base(root, document.Project.Solution.
Services
)
FindSymbols\Declarations\DeclarationFinder_SourceDeclarations.cs (2)
45
var client = await RemoteHostClient.TryGetClientAsync(solution.
Services
, cancellationToken).ConfigureAwait(false);
116
var client = await RemoteHostClient.TryGetClientAsync(solution.
Services
, cancellationToken).ConfigureAwait(false);
FindSymbols\FindReferences\DependentTypeFinder_Remote.cs (1)
29
var client = await RemoteHostClient.TryGetClientAsync(solution.
Services
, cancellationToken).ConfigureAwait(false);
FindSymbols\Shared\AbstractSyntaxIndex_Persistence.cs (2)
38
var storageService = document.Project.Solution.
Services
.GetPersistentStorageService();
129
var persistentStorageService = solution.
Services
.GetPersistentStorageService();
FindSymbols\SymbolFinder.cs (1)
114
return await FindSymbolAtPositionAsync(semanticModel, position, document.Project.Solution.
Services
, cancellationToken).ConfigureAwait(false);
FindSymbols\SymbolFinder_FindLiteralReferences.cs (1)
24
var client = await RemoteHostClient.TryGetClientAsync(solution.
Services
, cancellationToken).ConfigureAwait(false);
FindSymbols\SymbolFinder_FindReferences_Current.cs (1)
44
var client = await RemoteHostClient.TryGetClientAsync(solution.
Services
, cancellationToken).ConfigureAwait(false);
FindSymbols\SymbolTree\SymbolTreeInfo_Metadata.cs (4)
108
checksum ??= GetMetadataChecksum(solution.
Services
, reference, cancellationToken);
118
solution.
Services
, SolutionKey.ToSolutionKey(solution), reference, checksum, cancellationToken).ConfigureAwait(false);
230
solution.
Services
,
232
checksum: GetMetadataChecksum(solution.
Services
, reference, cancellationToken),
FindSymbols\SymbolTree\SymbolTreeInfo_Source.cs (2)
41
solution.
Services
,
58
project.Solution.
Services
,
FindSymbols\SymbolTree\SymbolTreeInfoCacheService.cs (1)
194
var checksum = SymbolTreeInfo.GetMetadataChecksum(project.Solution.
Services
, reference, cancellationToken);
Formatting\Formatter.cs (3)
96
var services = document.Project.Solution.
Services
;
117
var services = document.Project.Solution.
Services
;
134
var services = document.Project.Solution.
Services
;
LinkedFileDiffMerging\LinkedFileDiffMergingSession.cs (1)
88
var textDifferencingService = _oldSolution.
Services
.GetRequiredService<IDocumentTextDifferencingService>();
Remote\IRemoteKeepAliveService.cs (1)
41
var client = await RemoteHostClient.TryGetClientAsync(solution.
Services
, cancellationToken).ConfigureAwait(false);
Remote\RemoteHostClient.cs (1)
43
return TryGetClientAsync(project.Solution.
Services
, cancellationToken);
Rename\ConflictEngine\ConflictResolver.cs (4)
64
var client = await RemoteHostClient.TryGetClientAsync(solution.
Services
, cancellationToken).ConfigureAwait(false);
73
callbackTarget: new RemoteOptionsProvider<CodeCleanupOptions>(solution.
Services
, lightweightRenameLocations.FallbackOptions),
158
var languageServices = solution.
Services
.GetLanguageServices(language);
189
conflictResolution.CurrentSolution.
Services
.GetRequiredLanguageService<IRenameRewriterLanguageService>(renamedSymbol.Language);
Rename\ConflictEngine\ConflictResolver.Session.cs (2)
649
var newReferencedSymbols = RenameUtilities.GetSymbolsTouchingPosition(tokenOrNode.Span.Start, newDocumentSemanticModel, newDocument.Project.Solution.
Services
, _cancellationToken);
710
solution.
Services
.GetLanguageServices(language).GetService<IRenameRewriterLanguageService>()
Rename\LightweightRenameLocations.cs (2)
89
var client = await RemoteHostClient.TryGetClientAsync(solution.
Services
, cancellationToken).ConfigureAwait(false);
95
callbackTarget: new RemoteOptionsProvider<CodeCleanupOptions>(solution.
Services
, fallbackOptions),
Rename\Renamer.cs (2)
173
var client = await RemoteHostClient.TryGetClientAsync(solution.
Services
, cancellationToken).ConfigureAwait(false);
186
callbackTarget: new RemoteOptionsProvider<CodeCleanupOptions>(solution.
Services
, fallbackOptions),
Rename\SymbolicRenameLocations.ReferenceProcessing.cs (1)
330
var syntaxFactsLanguageService = solution.
Services
.GetLanguageServices(documentsGroupedByLanguage.Key).GetService<ISyntaxFactsService>();
Shared\Extensions\IFindReferencesResultExtensions.cs (1)
126
var isCaseSensitive = solution.
Services
.GetLanguageServices(reference.Definition.Language).GetRequiredService<ISyntaxFactsService>().IsCaseSensitive;
Shared\Extensions\ITypeSymbolExtensions.cs (1)
118
var result = currentType.FindImplementations(constructedInterfaceMember, solution.
Services
);
Simplification\Simplifier.cs (3)
75
return Expand(node, semanticModel, document.Project.Solution.
Services
, expandInsideNode, expandParameter, cancellationToken);
120
return Expand(token, semanticModel, document.Project.Solution.
Services
, expandInsideNode, cancellationToken);
257
var simplificationService = document.Project.Solution.
Services
.GetRequiredLanguageService<ISimplificationService>(document.Project.Language);
SupportedChangesServiceExtensions.cs (2)
10
=> solution.
Services
.GetRequiredService<ISupportedChangesService>().CanApplyChange(kind);
13
=> project.Solution.
Services
.GetRequiredService<ISupportedChangesService>().CanApplyParseOptionChange(oldOptions, newOptions, project);
SyntaxEditorBasedCodeFixProvider.cs (1)
82
var editor = new SyntaxEditor(root, document.Project.Solution.
Services
);
Workspace\Host\ISupportedChangesService.cs (1)
13
/// Can be acquired from <see cref="Solution.
Services
"/>, with <see cref="SolutionServices.GetService{ISupportedChangesService}"/>.
Workspace\Workspace.cs (4)
181
_latestSolution = solution.WithNewWorkspace(oldSolution.WorkspaceKind, oldSolution.WorkspaceVersion + 1, oldSolution.
Services
);
234
var options = oldSolution.
Services
.GetRequiredService<IWorkspaceConfigurationService>().Options;
369
newSolution = newSolution.WithNewWorkspace(oldSolution.WorkspaceKind, oldSolution.WorkspaceVersion + 1, oldSolution.
Services
);
1051
var options = oldSolution.
Services
.GetRequiredService<IWorkspaceConfigurationService>().Options;
Microsoft.CodeAnalysis.Workspaces.UnitTests (1)
SolutionTests\SolutionTests.cs (1)
3273
.AddDocument(did, "x", new WorkspaceFileTextLoader(solution.
Services
, @"C:\doesnotexist.cs", Encoding.UTF8))
Microsoft.VisualStudio.LanguageServices (25)
CallHierarchy\CallHierarchyCommandHandler.cs (3)
92
semanticModel, caretPosition, document.Project.Solution.
Services
, cancellationToken).ConfigureAwait(false);
97
var mappingService = document.Project.Solution.
Services
.GetService<ISymbolMappingService>();
117
var notificationService = document.Project.Solution.
Services
.GetService<INotificationService>();
CallHierarchy\Finders\AbstractCallFinder.cs (1)
120
var documentTrackingService = project.Solution.
Services
.GetRequiredService<IDocumentTrackingService>();
ChangeSignature\AddParameterDialogViewModel.cs (1)
28
_notificationService = document.Project.Solution.
Services
.GetService<INotificationService>();
ChangeSignature\ChangeSignatureDialogViewModel.cs (1)
64
_notificationService = document.Project.Solution.
Services
.GetRequiredService<INotificationService>();
CodeLens\RemoteCodeLensReferencesService.cs (4)
53
var client = await RemoteHostClient.TryGetClientAsync(solution.
Services
, cancellationToken).ConfigureAwait(false);
99
var client = await RemoteHostClient.TryGetClientAsync(solution.
Services
, cancellationToken).ConfigureAwait(false);
124
var client = await RemoteHostClient.TryGetClientAsync(solution.
Services
, cancellationToken).ConfigureAwait(false);
262
var client = await RemoteHostClient.TryGetClientAsync(solution.
Services
, cancellationToken).ConfigureAwait(false);
ExtractClass\VisualStudioExtractClassOptionsService.cs (1)
54
var notificationService = document.Project.Solution.
Services
.GetRequiredService<INotificationService>();
FindReferences\Entries\DocumentSpanEntry.cs (2)
196
var controlService = _excerptResult.Document.Project.Solution.
Services
.GetRequiredService<IContentControlService>();
225
var controlService = document.Project.Solution.
Services
.GetRequiredService<IContentControlService>();
FindReferences\VisualStudioDefinitionsAndReferencesFactory.cs (1)
48
var symbolNavigationService = solution.
Services
.GetRequiredService<ISymbolNavigationService>();
Implementation\AbstractEditorFactory.cs (1)
329
var fileLoader = new WorkspaceFileTextLoader(solution.
Services
, filePath, defaultEncoding: null);
Progression\GraphBuilder.cs (1)
329
var progressionLanguageService = solution.
Services
.GetLanguageServices(symbol.Language).GetService<IProgressionLanguageService>();
Snippets\AbstractSnippetExpansionClient.cs (1)
767
var semanticInfo = semanticModel.GetSemanticInfo(token, document.Project.Solution.
Services
, cancellationToken);
UnusedReferences\RemoveUnusedReferencesCommandHandler.cs (1)
194
var unusedReferenceAnalysisService = solution.
Services
.GetRequiredService<IUnusedReferenceAnalysisService>();
UnusedReferences\UnusedReferenceAnalysisService.cs (1)
29
var client = await RemoteHostClient.TryGetClientAsync(solution.
Services
, cancellationToken).ConfigureAwait(false);
ValueTracking\ValueTrackingCommandHandler.cs (2)
103
var service = document.Project.Solution.
Services
.GetRequiredService<IValueTrackingService>();
126
var valueTrackingService = solution.
Services
.GetRequiredService<IValueTrackingService>();
Venus\ContainedDocument.cs (1)
812
var services = document.Project.Solution.
Services
;
Venus\ContainedLanguageCodeSupport.cs (1)
236
targetDocument.Project.Solution.
Services
,
Workspace\VisualStudioSymbolNavigationService.cs (2)
78
var navigationService = solution.
Services
.GetRequiredService<IDocumentNavigationService>();
97
foreach (var lazyService in solution.
Services
.ExportProvider.GetExports<ICrossLanguageSymbolNavigationService>())
Microsoft.VisualStudio.LanguageServices.CSharp (1)
LanguageService\CSharpHelpContextService.cs (1)
173
symbol = semanticModel.GetSemanticInfo(token, document.Project.Solution.
Services
, cancellationToken)
Microsoft.VisualStudio.LanguageServices.Xaml (1)
Implementation\LanguageServer\Extensions\SymbolExtensions.cs (1)
57
var services = codeProject.Solution.
Services
;
Roslyn.VisualStudio.Next.UnitTests (2)
Remote\SnapshotSerializationTests.cs (1)
532
var serializer = document.Project.Solution.
Services
.GetService<ISerializerService>();
Services\SolutionServiceTests.cs (1)
355
var solutionCrawlerService = remoteSolution.
Services
.GetService<ISolutionCrawlerRegistrationService>() as SolutionCrawlerRegistrationService;