1 write to Services
Microsoft.CodeAnalysis.Workspaces (1)
Workspace\Workspace.cs (1)
74
Services
= host.CreateWorkspaceServices(this);
555 references to Services
AnalyzerRunner (2)
IncrementalAnalyzerRunner.cs (2)
39
var exportProvider = _workspace.
Services
.SolutionServices.ExportProvider;
45
var persistentStorageService = _workspace.
Services
.SolutionServices.GetPersistentStorageService();
GenerateDocumentationAndConfigFiles (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ISolutionExtensions.cs (1)
174
=> solution.Workspace.
Services
.GetExtendedLanguageServices(languageName);
IdeBenchmarks (2)
FormatterBenchmarks.cs (2)
47
return Formatter.GetFormattedTextChanges(root, workspace.
Services
.SolutionServices, options, CancellationToken.None);
60
return Formatter.GetFormattedTextChanges(root, workspace.
Services
.SolutionServices, options, CancellationToken.None);
IdeCoreBenchmarks (2)
FindReferencesBenchmarks.cs (1)
83
var storageService = _workspace.
Services
.SolutionServices.GetPersistentStorageService();
NavigateToBenchmarks.cs (1)
183
var storageService = _workspace.
Services
.SolutionServices.GetPersistentStorageService();
Microsoft.CodeAnalysis.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ISolutionExtensions.cs (1)
174
=> solution.Workspace.
Services
.GetExtendedLanguageServices(languageName);
Microsoft.CodeAnalysis.BannedApiAnalyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ISolutionExtensions.cs (1)
174
=> solution.Workspace.
Services
.GetExtendedLanguageServices(languageName);
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ISolutionExtensions.cs (1)
174
=> solution.Workspace.
Services
.GetExtendedLanguageServices(languageName);
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (19)
CodeActions\GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersTests.cs (1)
46
var service = (TestPickMembersService)workspace.
Services
.GetService<IPickMembersService>();
CodeActions\MoveStaticMembers\CSharpMoveStaticMembersTests.cs (1)
3431
var testOptionsService = (TestMoveStaticMembersService)workspace.
Services
.GetRequiredService<IMoveStaticMembersOptionsService>();
CodeActions\PreviewExceptionTests.cs (3)
30
var errorReportingService = (TestErrorReportingService)workspace.
Services
.GetRequiredService<IErrorReportingService>();
43
var errorReportingService = (TestErrorReportingService)workspace.
Services
.GetRequiredService<IErrorReportingService>();
56
var errorReportingService = (TestErrorReportingService)workspace.
Services
.GetRequiredService<IErrorReportingService>();
Completion\CompletionProviders\LoadDirectiveCompletionProviderTests.cs (1)
86
var languageServices = workspace.
Services
.GetLanguageServices(LanguageNames.CSharp);
Completion\CompletionProviders\ReferenceDirectiveCompletionProviderTests.cs (1)
125
var languageServices = workspace.
Services
.GetLanguageServices(LanguageNames.CSharp);
EditorConfigSettings\Updater\SettingsUpdaterTests.cs (2)
49
=> workspace.
Services
.SolutionServices.ExportProvider.GetExportedValue<IGlobalOptionService>();
384
var settingsProviderFactory = workspace.
Services
.GetRequiredService<IWorkspaceSettingsProviderFactory<NamingStyleSetting>>();
EncapsulateField\EncapsulateFieldTestState.cs (1)
37
var notificationService = Workspace.
Services
.GetService<INotificationService>() as INotificationServiceCallback;
ExtractMethod\ExtractMethodMiscellaneousTests.cs (1)
131
var callBackService = (INotificationServiceCallback)workspace.
Services
.GetRequiredService<INotificationService>();
Formatting\FormattingEngineTests.cs (2)
345
var node = Formatter.Format(syntaxRoot, spans, workspace.
Services
.SolutionServices, options, rules: default, CancellationToken.None);
2097
var formattedRoot = Formatter.Format(root, workspace.
Services
.SolutionServices, options, CancellationToken.None);
Formatting\Indentation\CSharpFormatterTestsBase.cs (2)
85
var formattingRuleProvider = workspace.
Services
.GetService<IHostDependentFormattingRuleFactoryService>();
114
var factory = (TestFormattingRuleFactoryServiceFactory.Factory)workspace.
Services
.GetService<IHostDependentFormattingRuleFactoryService>();
Formatting\Indentation\SmartIndenterTests.cs (1)
3422
var provider = (TestFormattingRuleFactoryServiceFactory.Factory)workspace.
Services
.GetService<IHostDependentFormattingRuleFactoryService>();
LineSeparators\LineSeparatorTests.cs (1)
503
var lineSeparatorService = Assert.IsType<CSharpLineSeparatorService>(workspace.
Services
.GetLanguageServices(LanguageNames.CSharp).GetRequiredService<ILineSeparatorService>());
StringCopyPaste\StringCopyPasteCommandHandlerTests.cs (1)
89
var service = workspace.
Services
.GetRequiredService<IStringCopyPasteService>() as TestStringCopyPasteService;
Workspaces\WorkspaceTests_EditorFeatures.cs (1)
607
var trackingService = (TestDocumentTrackingService)workspace.
Services
.GetRequiredService<IDocumentTrackingService>();
Microsoft.CodeAnalysis.CSharp.Features (1)
Copilot\CSharpCopilotCodeFixProvider.DismissChangesCodeAction.cs (1)
38
if (workspace.
Services
.GetService<IWorkspaceTelemetryService>()?.IsUserMicrosoftInternal is true)
Microsoft.CodeAnalysis.CSharp.Features.UnitTests (2)
Copilot\CSharpImplementNotImplementedExceptionFixProviderTests.cs (1)
597
var copilotService = testWorkspace.
Services
.GetLanguageServices(LanguageNames.CSharp)
Diagnostics\Suppression\SuppressionTests.cs (1)
479
var diagnosticService = workspace.
Services
.GetRequiredService<IDiagnosticAnalyzerService>();
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (12)
CodeGeneration\SyntaxGeneratorTests.cs (1)
4901
var elasticOnlyFormatted = Formatter.Format(newRoot, SyntaxAnnotation.ElasticAnnotation, _workspace.
Services
.SolutionServices, CSharpSyntaxFormattingOptions.Default, CancellationToken.None).ToFullString();
Formatting\FormattingElasticTriviaTests.cs (5)
71
var newCompilation = Formatter.Format(compilation, workspace.
Services
.SolutionServices, CSharpSyntaxFormattingOptions.Default, CancellationToken.None);
130
var formatted = Formatter.Format(newRoot, workspace.
Services
.SolutionServices, options, CancellationToken.None).ToFullString();
133
var elasticOnlyFormatted = Formatter.Format(newRoot, SyntaxAnnotation.ElasticAnnotation, workspace.
Services
.SolutionServices, options, CancellationToken.None).ToFullString();
136
var annotationFormatted = Formatter.Format(newRoot, Formatter.Annotation, workspace.
Services
.SolutionServices, options, CancellationToken.None).ToFullString();
180
var newCompilation = Formatter.Format(compilation, workspace.
Services
.SolutionServices, CSharpSyntaxFormattingOptions.Default, CancellationToken.None);
Formatting\FormattingMultipleSpanTests.cs (1)
158
var result = Formatter.Format(root, TextSpan.FromBounds(0, 0), workspace.
Services
.SolutionServices, CSharpSyntaxFormattingOptions.Default, CancellationToken.None);
Formatting\FormattingTests.cs (3)
4846
var newProperty = Formatter.Format(property, workspace.
Services
.SolutionServices, CSharpSyntaxFormattingOptions.Default, CancellationToken.None);
8412
Formatter.Format(block, new AdhocWorkspace().
Services
.SolutionServices, CSharpSyntaxFormattingOptions.Default, CancellationToken.None);
9554
=> Formatter.Format(SyntaxFactory.StructDeclaration("S"), DefaultWorkspace.
Services
.SolutionServices, CSharpSyntaxFormattingOptions.Default, CancellationToken.None);
Formatting\FormattingTriviaTests.cs (2)
1586
var formatted = Formatter.Format(tree, workspace.
Services
.SolutionServices, options, CancellationToken.None);
1622
var formatted = Formatter.Format(tree, workspace.
Services
.SolutionServices, options, CancellationToken.None);
Microsoft.CodeAnalysis.EditorFeatures (57)
ChangeSignature\AbstractChangeSignatureCommandHandler.cs (2)
99
var notificationService = workspace.
Services
.GetRequiredService<INotificationService>();
117
var previewService = workspace.
Services
.GetService<IPreviewDialogService>();
Classification\Syntactic\SyntacticClassificationTaggerProvider.TagComputer.cs (1)
146
if (workspace?.
Services
.SolutionServices is not { } solutionServices)
CodeActions\CodeActionEditHandlerService.cs (6)
113
workspace.
Services
.GetService<INotificationService>()?.SendNotification(
137
using (workspace.
Services
.GetRequiredService<ISourceTextUndoService>().RegisterUndoTransaction(text, title))
299
var navigationService = workspace.
Services
.GetRequiredService<IDocumentNavigationService>();
308
var navigationService = workspace.
Services
.GetRequiredService<IDocumentNavigationService>();
330
var navigationService = workspace.
Services
.GetRequiredService<IDocumentNavigationService>();
354
var navigationService = editorWorkspace.
Services
.GetRequiredService<IDocumentNavigationService>();
CodeDefinitionWindow\DefinitionContextTracker.cs (2)
149
var navigationService = workspace.
Services
.GetRequiredService<IDocumentNavigationService>();
173
var symbolNavigationService = workspace.
Services
.GetRequiredService<ISymbolNavigationService>();
EditAndContinue\ActiveStatementTaggerProvider.EventSource.cs (2)
16
var trackingService = workspace.
Services
.GetService<IActiveStatementTrackingService>();
26
var trackingService = workspace.
Services
.GetService<IActiveStatementTrackingService>();
EditAndContinue\ActiveStatementTrackingService.cs (1)
124
_compileTimeSolutionProvider = workspace.
Services
.GetRequiredService<ICompileTimeSolutionProvider>();
EditAndContinue\EditAndContinueLanguageService.cs (1)
73
=> workspaceProvider.Value.Workspace.
Services
.SolutionServices;
Editor\TextEditApplication.cs (1)
36
var undoService = workspace.
Services
.GetRequiredService<ISourceTextUndoService>();
EditorConfigSettings\Updater\SettingsUpdaterBase.cs (1)
29
_listener = workspace.
Services
.GetRequiredService<IWorkspaceAsynchronousOperationListenerProvider>().GetListener();
EncapsulateField\AbstractEncapsulateFieldCommandHandler.cs (3)
67
var indicatorFactory = workspace.
Services
.GetRequiredService<IBackgroundWorkIndicatorFactory>();
90
var notificationService = workspace.
Services
.GetRequiredService<INotificationService>();
107
var previewService = workspace.
Services
.GetService<IPreviewDialogService>();
Extensibility\NavigationBar\AbstractEditorNavigationBarItemService.cs (2)
57
var navigationService = workspace.
Services
.GetRequiredService<IDocumentNavigationService>();
65
var notificationService = workspace.
Services
.GetRequiredService<INotificationService>();
ExternalAccess\VSTypeScript\VSTypeScriptNavigationBarItemService.cs (1)
59
var navigationService = workspace.
Services
.GetRequiredService<IDocumentNavigationService>();
ExtractInterface\AbstractExtractInterfaceCommandHandler.cs (2)
71
(errorMessage, severity) => workspace.
Services
.GetService<INotificationService>().SendNotification(errorMessage, severity: severity),
85
var navigationService = workspace.
Services
.GetService<IDocumentNavigationService>();
InlineDiagnostics\InlineDiagnosticsTaggerProvider.cs (1)
71
var navigateService = workspace.
Services
.GetRequiredService<INavigateToLinkService>();
InlineRename\CommandHandlers\AbstractRenameCommandHandler_RenameHandler.cs (2)
89
var backgroundWorkIndicatorFactory = workspace.
Services
.GetRequiredService<IBackgroundWorkIndicatorFactory>();
140
var notificationService = workspace.
Services
.GetService<INotificationService>();
InlineRename\CommandHandlers\RenameCommandHandler.cs (2)
81
var notificationService = activeSession.Workspace.
Services
.GetService<INotificationService>();
87
var errorReportingService = activeSession.Workspace.
Services
.GetService<IErrorReportingService>();
InlineRename\InlineRenameService.cs (1)
122
var navigationService = workspace.
Services
.GetRequiredService<IDocumentNavigationService>();
InlineRename\InlineRenameSession.cs (4)
180
this.UndoManager = workspace.
Services
.GetService<IInlineRenameUndoManager>();
771
var factory = Workspace.
Services
.GetRequiredService<IBackgroundWorkIndicatorFactory>();
808
var previewService = Workspace.
Services
.GetService<IPreviewDialogService>();
852
var notificationService = Workspace.
Services
.GetService<INotificationService>();
InlineRename\UndoManagerServiceFactory.cs (1)
40
var textUndoHistoryService = workspace.
Services
.GetService<ITextUndoHistoryWorkspaceService>();
IntelliSense\QuickInfo\QuickInfoHyperLink.cs (1)
44
var navigateToLinkService = _workspace.
Services
.GetRequiredService<INavigateToLinkService>();
Interactive\InteractiveSession.cs (2)
201
var metadataService = _workspace.
Services
.GetRequiredService<IMetadataService>();
297
var metadataService = _workspace.
Services
.GetRequiredService<IMetadataService>();
NavigateTo\NavigateToHelpers.cs (1)
40
var navigationService = workspace.
Services
.GetRequiredService<IDocumentNavigationService>();
NavigateTo\NavigateToItemDisplay.cs (2)
121
var previewService = workspace.
Services
.GetService<INavigateToPreviewService>();
135
var previewService = workspace.
Services
.GetService<INavigateToPreviewService>();
Navigation\AbstractDefinitionLocationService.cs (1)
35
var service = workspace.
Services
.GetRequiredService<IDocumentNavigationService>();
Organizing\OrganizeDocumentCommandHandler.cs (2)
62
var organizeImportsService = workspace.
Services
.SolutionServices.GetProjectServices(args.SubjectBuffer)!.GetRequiredService<IOrganizeImportsService>();
129
var indicatorFactory = workspace.
Services
.GetRequiredService<IBackgroundWorkIndicatorFactory>();
Peek\PeekableItemSource.cs (1)
127
var navigationService = workspace.
Services
.GetRequiredService<IDocumentNavigationService>();
Peek\PeekHelpers.cs (1)
53
var syntaxFactsService = workspace.
Services
.GetLanguageServices(root.Language).GetService<ISyntaxFactsService>();
QuickInfo\Extensions.cs (1)
22
var cloneServices = workspace.
Services
.SolutionServices.ExportProvider.GetExports<ITextBufferCloneService>();
Remote\SolutionChecksumUpdater.cs (1)
57
_documentTrackingService = workspace.
Services
.GetRequiredService<IDocumentTrackingService>();
RenameTracking\RenameTrackingTaggerProvider.RenameTrackingCodeAction.cs (1)
123
var notificationService = workspace.
Services
.GetService<INotificationService>();
Shared\Extensions\HostWorkspaceServicesExtensions.cs (1)
44
workspace.
Services
.SolutionServices.GetProjectServices(buffer.ContentType)?.Language : null;
Shared\Extensions\ITextBufferExtensions.cs (2)
20
var workspaceContextService = workspace.
Services
.GetRequiredService<IWorkspaceContextService>();
59
service = workspace.
Services
.GetService<ITextBufferSupportsFeatureService>();
Shared\Preview\PreviewWorkspace.cs (1)
28
: base(solution.Workspace.
Services
.HostServices, WorkspaceKind.Preview)
Suggestions\FixAll\FixAllGetFixesService.cs (1)
20
var previewService = workspace.
Services
.GetRequiredService<IPreviewDialogService>();
Suggestions\FixAll\FixMultipleOccurrencesService.cs (1)
75
var extensionManager = workspace.
Services
.GetService<IExtensionManager>();
Undo\Extensions.cs (1)
19
var undoService = workspace.
Services
.GetService<IGlobalUndoService>();
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (14)
AbstractCommandHandlerTestState.cs (1)
70
var contentType = Workspace.
Services
.GetLanguageServices(languageName).GetRequiredService<IContentTypeLanguageService>().GetDefaultContentType();
CodeLens\AbstractCodeLensTest.cs (4)
35
var result = await workspace.
Services
.GetRequiredService<ICodeLensReferencesService>().GetReferenceCountAsync(workspace.CurrentSolution, annotatedDocument.Id,
62
var result = await workspace.
Services
.GetRequiredService<ICodeLensReferencesService>().FindReferenceLocationsAsync(workspace.CurrentSolution,
88
var result = await workspace.
Services
.GetRequiredService<ICodeLensReferencesService>().FindReferenceMethodsAsync(workspace.CurrentSolution,
114
var actual = await workspace.
Services
.GetRequiredService<ICodeLensReferencesService>().GetFullyQualifiedNameAsync(workspace.CurrentSolution,
Completion\AbstractArgumentProviderTests`1.cs (1)
101
var syntaxFacts = workspace.
Services
.GetLanguageServices(root.Language).GetRequiredService<ISyntaxFactsService>();
Formatting\CoreFormatterTestsBase.cs (6)
96
if (workspace.
Services
.GetService<IHostDependentFormattingRuleFactoryService>() is TestFormattingRuleFactoryServiceFactory.Factory factory && factory.BaseIndentation != 0 && factory.TextSpan.Contains(p.Position))
191
var formattingRuleProvider = workspace.
Services
.GetService<IHostDependentFormattingRuleFactoryService>();
214
var newRootNode = Formatter.Format(root, spans, workspace.
Services
.SolutionServices, options, rules, CancellationToken.None);
227
var result = Formatter.GetFormattedTextChanges(root, spans, workspace.
Services
.SolutionServices, options, rules, CancellationToken.None);
287
var formattingService = workspace.
Services
.GetLanguageServices(node.Language).GetRequiredService<ISyntaxFormattingService>();
289
var result = Formatter.Format(node, workspace.
Services
.SolutionServices, options, CancellationToken.None);
Workspaces\EditorTestHostProject.cs (2)
61
: base(workspace.
Services
,
89
: base(workspace.
Services
, name, language, compilationOptions, parseOptions, [document], [], [], projectReferences, metadataReferences, analyzerReferences, assemblyName, defaultNamespace)
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (45)
CodeFixes\CodeFixServiceTests.cs (8)
48
var diagnosticService = workspace.
Services
.GetRequiredService<IDiagnosticAnalyzerService>();
53
var logger = SpecializedCollections.SingletonEnumerable(new Lazy<IErrorLoggerService>(() => workspace.
Services
.GetRequiredService<IErrorLoggerService>()));
272
var errorReportingService = (TestErrorReportingService)workspace.
Services
.GetRequiredService<IErrorReportingService>();
299
var errorReportingService = (TestErrorReportingService)workspace.
Services
.GetRequiredService<IErrorReportingService>();
344
var diagnosticService = workspace.
Services
.GetRequiredService<IDiagnosticAnalyzerService>();
741
var diagnosticService = workspace.
Services
.GetRequiredService<IDiagnosticAnalyzerService>();
743
var logger = SpecializedCollections.SingletonEnumerable(new Lazy<IErrorLoggerService>(() => workspace.
Services
.GetRequiredService<IErrorLoggerService>()));
1030
var analyzerService = (DiagnosticAnalyzerService)workspace.
Services
.GetRequiredService<IDiagnosticAnalyzerService>();
CodeGeneration\AbstractCodeGenerationTests.cs (2)
81
var codeDefFactory = workspace.
Services
.GetLanguageServices(LanguageNames.CSharp).GetRequiredService<SyntaxGenerator>();
102
var codeDefFactory = workspace.
Services
.GetLanguageServices(LanguageNames.VisualBasic).GetRequiredService<SyntaxGenerator>();
CodeRefactorings\CodeRefactoringServiceTest.cs (1)
100
var errorReportingService = (TestErrorReportingService)workspace.
Services
.GetRequiredService<IErrorReportingService>();
Diagnostics\DiagnosticAnalyzerServiceTests.cs (13)
45
=> workspace.
Services
.SolutionServices.ExportProvider.GetExportedValue<IGlobalOptionService>();
51
var documentTrackingService = (TestDocumentTrackingService)workspace.
Services
.GetRequiredService<IDocumentTrackingService>();
65
var service = workspace.
Services
.GetRequiredService<IDiagnosticAnalyzerService>();
176
var service = workspace.
Services
.GetRequiredService<IDiagnosticAnalyzerService>();
215
var service = workspace.
Services
.GetRequiredService<IDiagnosticAnalyzerService>();
258
var service = workspace.
Services
.GetRequiredService<IDiagnosticAnalyzerService>();
341
var service = workspace.
Services
.GetRequiredService<IDiagnosticAnalyzerService>();
386
var service = workspace.
Services
.GetRequiredService<IDiagnosticAnalyzerService>();
450
var service = workspace.
Services
.GetRequiredService<IDiagnosticAnalyzerService>();
458
var documentTrackingService = (TestDocumentTrackingService)workspace.
Services
.GetService<IDocumentTrackingService>();
566
var service = workspace.
Services
.GetRequiredService<IDiagnosticAnalyzerService>();
579
var documentTrackingService = (TestDocumentTrackingService)workspace.
Services
.GetRequiredService<IDocumentTrackingService>();
929
var service = workspace.
Services
.GetRequiredService<IDiagnosticAnalyzerService>();
EditAndContinue\EditAndContinueLanguageServiceTests.cs (1)
378
loader: new WorkspaceFileTextLoader(workspace.
Services
.SolutionServices, sourceFile.Path, Encoding.UTF8),
EditorConfigSettings\Data\CodeStyleSettingsTest.cs (1)
22
=> workspace.
Services
.SolutionServices.ExportProvider.GetExportedValue<IGlobalOptionService>();
LanguageServer\VSTypeScriptHandlerTests.cs (1)
131
TestWorkspace.
Services
.HostServices,
Options\GlobalOptionsTests.cs (1)
185
var languageServices = workspace.
Services
.SolutionServices.GetLanguageServices(language);
Preview\PreviewWorkspaceTests.cs (1)
117
var persistentService = previewWorkspace.
Services
.SolutionServices.GetPersistentStorageService();
RenameTracking\RenameTrackingTestState.cs (1)
93
var notificationService = (INotificationServiceCallback)Workspace.
Services
.GetRequiredService<INotificationService>();
StackTraceExplorer\StackTraceExplorerTests.cs (5)
39
var service = workspace.
Services
.GetRequiredService<IStackTraceExplorerService>();
817
var service = workspace.
Services
.GetRequiredService<IStackTraceExplorerService>();
847
var service = workspace.
Services
.GetRequiredService<IStackTraceExplorerService>();
885
var service = workspace.
Services
.GetRequiredService<IStackTraceExplorerService>();
924
var service = workspace.
Services
.GetRequiredService<IStackTraceExplorerService>();
ValueTracking\AbstractBaseValueTrackingTests.cs (2)
31
var service = testWorkspace.
Services
.GetRequiredService<IValueTrackingService>();
38
var service = testWorkspace.
Services
.GetRequiredService<IValueTrackingService>();
Workspaces\DefaultMefHostTests.cs (2)
26
var csservice = ws.
Services
.GetLanguageServices(LanguageNames.CSharp).GetService<Microsoft.CodeAnalysis.Completion.CompletionService>();
29
var vbservice = ws.
Services
.GetLanguageServices(LanguageNames.VisualBasic).GetService<Microsoft.CodeAnalysis.Completion.CompletionService>();
Workspaces\TextFactoryTests.cs (6)
27
var textFactoryService = Assert.IsType<EditorTextFactoryService>(workspace.
Services
.GetRequiredService<ITextFactoryService>());
40
var textFactoryService = Assert.IsType<EditorTextFactoryService>(workspace.
Services
.GetRequiredService<ITextFactoryService>());
53
var textFactoryService = Assert.IsType<EditorTextFactoryService>(workspace.
Services
.GetRequiredService<ITextFactoryService>());
66
var textFactoryService = Assert.IsType<EditorTextFactoryService>(workspace.
Services
.GetRequiredService<ITextFactoryService>());
83
var temporaryStorageService = Assert.IsType<TemporaryStorageService>(workspace.
Services
.GetRequiredService<ITemporaryStorageServiceInternal>());
103
var temporaryStorageService = Assert.IsType<TemporaryStorageService>(workspace.
Services
.GetRequiredService<ITemporaryStorageServiceInternal>());
Microsoft.CodeAnalysis.ExternalAccess.FSharp (8)
Completion\FSharpCompletionServiceWithProviders.cs (1)
15
: base(workspace.
Services
.SolutionServices, AsynchronousOperationListenerProvider.NullProvider)
Internal\Editor\FSharpNavigationBarItemService.cs (2)
71
var navigationService = workspace.
Services
.GetRequiredService<IFSharpDocumentNavigationService>();
81
var notificationService = workspace.
Services
.GetRequiredService<INotificationService>();
LanguageServices\FSharpVisualStudioWorkspaceExtensions.cs (1)
17
var metadataReferenceProvider = workspace.
Services
.GetRequiredService<VisualStudioMetadataReferenceManager>();
Navigation\FSharpDocumentNavigationService.cs (4)
25
var service = workspace.
Services
.GetService<IDocumentNavigationService>();
32
var service = workspace.
Services
.GetService<IDocumentNavigationService>();
39
var service = workspace.
Services
.GetService<IDocumentNavigationService>();
47
var service = workspace.
Services
.GetService<IDocumentNavigationService>();
Microsoft.CodeAnalysis.Features (18)
AddImport\CodeActions\AssemblyReferenceCodeAction.cs (2)
97
var service = workspace.
Services
.GetRequiredService<IMetadataService>();
107
var assemblyResolverService = workspace.
Services
.GetRequiredService<IFrameworkAssemblyPathResolver>();
ChangeSignature\ChangeSignatureCodeActionOperation.cs (1)
40
var notificationService = workspace.
Services
.GetRequiredService<INotificationService>();
CodeRefactorings\AddMissingImports\AbstractAddMissingImportsRefactoringProvider.cs (1)
26
var services = document.Project.Solution.Workspace.
Services
.HostServices as IMefHostExportProvider;
Diagnostics\CodeAnalysisDiagnosticAnalyzerService.cs (1)
51
_diagnosticAnalyzerService = _workspace.
Services
.GetRequiredService<IDiagnosticAnalyzerService>();
DocumentSpanExtensions.cs (1)
18
var service = workspace.
Services
.GetRequiredService<IDocumentNavigationService>();
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingSolutionCrawlerService.cs (1)
42
if (workspace.
Services
.GetService<IUnitTestingSolutionCrawlerRegistrationService>() is UnitTestingSolutionCrawlerRegistrationService registration)
ExternalAccess\VSTypeScript\Api\VSTypeScriptCompletionServiceWithProviders.cs (1)
20
: base(workspace.
Services
.SolutionServices, AsynchronousOperationListenerProvider.NullProvider)
ExternalAccess\VSTypeScript\Api\VSTypeScriptDocumentNavigationServiceWrapper.cs (2)
21
=> new(workspace.
Services
.GetRequiredService<IDocumentNavigationService>(),
22
workspace.
Services
.GetRequiredService<IWorkspaceThreadingServiceProvider>());
FindUsages\DefinitionItem.DefaultDefinitionItem.cs (1)
49
var navigationService = workspace.
Services
.GetRequiredService<ISymbolNavigationService>();
GenerateOverrides\GenerateOverridesWithDialogCodeAction.cs (1)
104
var service = workspace.
Services
.GetService<ILegacyGlobalOptionsWorkspaceService>();
MetadataAsSource\DecompilationMetadataAsSourceFileProvider.cs (1)
272
workspace.OnDocumentClosed(documentIdInfo.DocumentId, new WorkspaceFileTextLoader(workspace.
Services
.SolutionServices, fileInfo.TemporaryFilePath, MetadataAsSourceGeneratedFileInfo.Encoding));
MetadataAsSource\MetadataAsSourceFileService.cs (3)
94
_workspace = new MetadataAsSourceWorkspace(this, sourceWorkspace.
Services
.HostServices);
164
var threadingService = workspace.
Services
.GetRequiredService<IWorkspaceThreadingServiceProvider>().Service;
216
workspace.OnDocumentClosed(documentId, new WorkspaceFileTextLoader(workspace.
Services
.SolutionServices, filePath, defaultEncoding: null));
PdbSourceDocument\PdbSourceDocumentMetadataAsSourceFileProvider.cs (2)
136
var documentationProvider = sourceWorkspace.
Services
.GetRequiredService<IDocumentationProviderService>();
304
var languageServices = workspace.
Services
.GetLanguageServices(languageName);
Microsoft.CodeAnalysis.Features.UnitTests (9)
EditAndContinue\CompileTimeSolutionProviderTests.cs (2)
60
var provider = workspace.
Services
.GetRequiredService<ICompileTimeSolutionProvider>();
122
var provider = workspace.
Services
.GetRequiredService<ICompileTimeSolutionProvider>();
EditAndContinue\EditAndContinueWorkspaceServiceTests.cs (2)
3690
var workspaceConfig = Assert.IsType<TestWorkspaceConfigurationService>(workspace.
Services
.GetRequiredService<IWorkspaceConfigurationService>());
3746
var workspaceConfig = Assert.IsType<TestWorkspaceConfigurationService>(workspace.
Services
.GetRequiredService<IWorkspaceConfigurationService>());
EditAndContinue\RemoteEditAndContinueServiceTests.cs (2)
58
var clientProvider = (InProcRemoteHostClientProvider?)localWorkspace.
Services
.GetService<IRemoteHostClientProvider>();
73
mockEncService = (MockEditAndContinueService)remoteWorkspace.
Services
.GetRequiredService<IEditAndContinueWorkspaceService>().Service;
EditAndContinue\UnitTestingHotReloadServiceTests.cs (1)
46
var hotReload = new UnitTestingHotReloadService(workspace.
Services
);
EditAndContinue\WatchHotReloadServiceTests.cs (2)
65
var hotReload = new WatchHotReloadService(workspace.
Services
, ["Baseline", "AddDefinitionToExistingType", "NewTypeDefinition"]);
204
var hotReload = new WatchHotReloadService(workspace.
Services
, ["Baseline", "AddDefinitionToExistingType", "NewTypeDefinition"]);
Microsoft.CodeAnalysis.LanguageServer (4)
FileBasedPrograms\FileBasedProgramsProjectSystem.cs (1)
93
workspace, documentFilePath, sourceTextLoader, languageInformation, documentText.ChecksumAlgorithm, workspace.
Services
.SolutionServices, []);
HostWorkspace\LanguageServerProjectLoader.cs (1)
256
if (projectLanguage != null && projectFactory.Workspace.
Services
.GetLanguageService<ICommandLineParserService>(projectLanguage) == null)
HostWorkspace\LanguageServerWorkspaceFactory.cs (1)
84
var loaderProvider = workspace.
Services
.GetRequiredService<IAnalyzerAssemblyLoaderProvider>();
HostWorkspace\WorkspaceProjectFactoryService.cs (1)
55
var workspaceProject = new WorkspaceProject(project, _workspaceFactory.HostWorkspace.
Services
.SolutionServices, _workspaceFactory.TargetFrameworkManager, _loggerFactory);
Microsoft.CodeAnalysis.LanguageServer.Protocol (2)
Handler\ServerLifetime\LspServiceLifeCycleManager.cs (1)
52
var service = hostWorkspace.
Services
.GetRequiredService<IExtensionMessageHandlerService>();
Workspaces\LspMiscellaneousFilesWorkspaceProvider.cs (1)
67
this, documentFilePath, sourceTextLoader, languageInformation, documentText.ChecksumAlgorithm,
Services
.SolutionServices, []);
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (10)
Completion\CompletionFeaturesTests.cs (4)
407
var mockService = testLspServer.TestWorkspace.
Services
.GetLanguageServices(LanguageNames.CSharp).GetRequiredService<CompletionService>() as CSharpLspMockCompletionService;
454
var mockService = testLspServer.TestWorkspace.
Services
.GetLanguageServices(LanguageNames.CSharp).GetRequiredService<CompletionService>() as CSharpLspMockCompletionService;
787
var mockService = testLspServer.TestWorkspace.
Services
.GetLanguageServices(LanguageNames.CSharp).GetRequiredService<CompletionService>() as CSharpLspMockCompletionService;
949
var mockService = testLspServer.TestWorkspace.
Services
.GetLanguageServices(LanguageNames.CSharp).GetRequiredService<CompletionService>() as CSharpLspThrowExceptionOnChangeCompletionService;
Completion\CompletionResolveTests.cs (1)
199
document, new TestCaretOutOfScopeCompletionService(testLspServer.TestWorkspace.
Services
.SolutionServices), selectedItem, snippetsSupported: true, insertNewPositionPlaceholder: true, CancellationToken.None).ConfigureAwait(false);
Definitions\GoToDefinitionTests.cs (1)
373
var service = Assert.IsType<TestSourceGeneratedDocumentSpanMappingService>(workspace.
Services
.GetService<ISourceGeneratedDocumentSpanMappingService>());
References\FindAllReferencesHandlerTests.cs (1)
384
var service = Assert.IsType<TestSourceGeneratedDocumentSpanMappingService>(workspace.
Services
.GetService<ISourceGeneratedDocumentSpanMappingService>());
Rename\RenameTests.cs (3)
278
var service = Assert.IsType<TestSourceGeneratedDocumentSpanMappingService>(workspace.
Services
.GetService<ISourceGeneratedDocumentSpanMappingService>());
328
var service = Assert.IsType<TestSourceGeneratedDocumentSpanMappingService>(workspace.
Services
.GetService<ISourceGeneratedDocumentSpanMappingService>());
370
var service = Assert.IsType<TestSourceGeneratedDocumentSpanMappingService>(workspace.
Services
.GetService<ISourceGeneratedDocumentSpanMappingService>());
Microsoft.CodeAnalysis.PerformanceSensitiveAnalyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ISolutionExtensions.cs (1)
174
=> solution.Workspace.
Services
.GetExtendedLanguageServices(languageName);
Microsoft.CodeAnalysis.Remote.ServiceHub (15)
ExternalAccess\UnitTesting\Api\UnitTestingBrokeredServiceImplementation.cs (1)
24
return NewUnitTestingIncrementalAnalyzerProvider.TryRegister(workspace.Kind, workspace.
Services
.SolutionServices, analyzerName, provider);
Host\RemoteWorkspace.cs (2)
36
=> new(solutionChecksum, assetCache, assetSource, this.
Services
.SolutionServices);
217
solutionChecksum, this.
Services
.SolutionServices, cancellationToken).ConfigureAwait(false);
Host\RemoteWorkspace.SolutionCreator.cs (4)
75
useAsync: true, deserializedAnalyzerReferences, _workspace.
Services
.SolutionServices, cancellationToken).ConfigureAwait(false);
381
useAsync: true, deserializedAnalyzerReferences, _workspace.
Services
.SolutionServices, cancellationToken).ConfigureAwait(false);
622
checksumFromRequest, _workspace.
Services
.SolutionServices, cancellationToken).ConfigureAwait(false);
623
var workspace = new AdhocWorkspace(_workspace.
Services
.HostServices);
Services\AssetSynchronization\RemoteAssetSynchronizationService.cs (1)
51
var documentTrackingService = GetWorkspace().
Services
.GetRequiredService<IDocumentTrackingService>() as RemoteDocumentTrackingService;
Services\AsynchronousOperationListener\RemoteAsynchronousOperationListenerService.cs (2)
40
var exportProvider = workspace.
Services
.SolutionServices.ExportProvider;
52
var exportProvider = workspace.
Services
.SolutionServices.ExportProvider;
Services\BrokeredServiceBase.cs (1)
79
=> GetWorkspace().
Services
.SolutionServices;
Services\DiagnosticAnalyzer\RemoteDiagnosticAnalyzerService.cs (1)
130
var service = GetWorkspace().
Services
.GetService<IPerformanceTrackerService>();
Services\EditAndContinue\RemoteEditAndContinueService.cs (1)
75
=> GetWorkspace().
Services
.GetRequiredService<IEditAndContinueWorkspaceService>().Service;
Services\ProcessTelemetry\RemoteProcessTelemetryService.cs (1)
44
var services = GetWorkspace().
Services
;
Services\SourceGeneration\RemoteSourceGenerationService.cs (1)
123
workspace.
Services
.SolutionServices,
Microsoft.CodeAnalysis.Workspaces (22)
Classification\Classifier.cs (1)
54
return GetClassifiedSpans(workspace.
Services
.SolutionServices, project: null, semanticModel, textSpan, ClassificationOptions.Default, cancellationToken);
Editing\SyntaxEditor.cs (1)
64
: this(root, (workspace ?? throw new ArgumentNullException(nameof(workspace))).
Services
.SolutionServices)
Editing\SyntaxGenerator.cs (1)
61
=> GetGenerator(workspace.
Services
.SolutionServices, language);
FindSymbols\SymbolFinder.cs (1)
51
return FindSymbolAtPositionAsync(semanticModel, position, workspace.
Services
.SolutionServices, cancellationToken);
Formatting\Formatter.cs (2)
244
var languageServices = workspace.
Services
.GetLanguageServices(node.Language);
319
var syntaxFormattingService = workspace.
Services
.GetRequiredLanguageService<ISyntaxFormattingService>(language);
Remote\RemoteHostClient.cs (2)
24
var service = workspace.
Services
.GetService<IRemoteHostClientProvider>();
42
=> TryGetClientAsync(workspace.
Services
.SolutionServices, cancellationToken);
Shared\TestHooks\AsynchronousOperationListenerProvider.cs (1)
121
if (workspace?.
Services
.GetService<IRemoteHostClientProvider>() is { } remoteHostClientProvider)
Simplification\Simplifier.cs (2)
86
return Expand(node, semanticModel, workspace.
Services
.SolutionServices, expandInsideNode, expandParameter, cancellationToken);
131
return Expand(token, semanticModel, workspace.
Services
.SolutionServices, expandInsideNode, cancellationToken);
Workspace\CommandLineProject.cs (1)
28
var languageServices = workspace.
Services
.SolutionServices.GetLanguageServices(language);
Workspace\ProjectSystem\ProjectSystemProjectFactory.cs (1)
49
public SolutionServices SolutionServices => this.Workspace.
Services
.SolutionServices;
Workspace\Solution\Solution.cs (2)
64
new SolutionState(workspace.Kind, workspace.
Services
.SolutionServices, solutionAttributes, options, analyzerReferences, fallbackAnalyzerOptions),
79
/// cref="Workspace.
Services
"/> when possible.
Workspace\Workspace.cs (5)
76
_legacyOptions =
Services
.GetRequiredService<ILegacyWorkspaceOptionService>().LegacyGlobalOptions;
80
_taskSchedulerProvider =
Services
.GetRequiredService<ITaskSchedulerProvider>();
82
var listenerProvider =
Services
.GetRequiredService<IWorkspaceAsynchronousOperationListenerProvider>();
447
var provider =
Services
.GetRequiredService<IFallbackAnalyzerConfigOptionsProvider>();
730
Services
.Dispose();
Workspace\Workspace_Events.cs (1)
195
_workspaceEventListenerService ??= this.
Services
.GetService<IWorkspaceEventListenerService>();
Workspace\Workspace_SourceGeneration.cs (1)
37
var configuration = this.
Services
.GetRequiredService<IWorkspaceConfigurationService>().Options;
Microsoft.CodeAnalysis.Workspaces.MSBuild (4)
MSBuild\MSBuildProjectLoader.cs (1)
61
_solutionServices = workspace.
Services
.SolutionServices;
MSBuild\MSBuildWorkspace.cs (3)
43
_projectFileExtensionRegistry = new ProjectFileExtensionRegistry(
Services
.SolutionServices, _reporter);
45
_loader = new MSBuildProjectLoader(
Services
.SolutionServices, _reporter, _loggerFactory, _projectFileExtensionRegistry, properties);
474
.WithTextLoader(new WorkspaceFileTextLoader(
Services
.SolutionServices, fullPath, text.Encoding));
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (6)
VisualStudioMSBuildWorkspaceTests.cs (6)
49
Assert.NotNull(workspace.
Services
);
50
Assert.NotNull(workspace.
Services
.Workspace);
51
Assert.Equal(workspace, workspace.
Services
.Workspace);
52
Assert.NotNull(workspace.
Services
.HostServices);
53
Assert.NotNull(workspace.
Services
.TextFactory);
3115
var commandLineParser = workspace.
Services
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (13)
Formatting\FormattingTestBase.cs (2)
58
await AssertFormatAsync(workspace.
Services
.SolutionServices, expected, root, spans.AsImmutable(), formattingOptions, await document.GetTextAsync());
61
AssertFormatWithTransformation(workspace.
Services
.SolutionServices, expected, root, spans, formattingOptions, treeCompare, parseOptions);
Workspaces\TestHostProject.cs (1)
103
: base(workspace.
Services
,
Workspaces\TestWorkspace_XmlConsumption.cs (6)
156
var languageServices =
Services
.GetLanguageServices(language);
371
if (!
Services
.SupportedLanguages.Contains(languageName))
374
string.Join(", ",
Services
.SupportedLanguages),
516
var languageServices =
Services
.GetLanguageServices(language);
517
var metadataService =
Services
.GetService<IMetadataService>();
763
var languageServices =
Services
.GetLanguageServices(languageName);
Workspaces\TestWorkspace`1.cs (4)
84
var partialSolutionsTestHook =
Services
.GetRequiredService<IWorkspacePartialSolutionsTestHook>();
107
if (
Services
.GetService<INotificationService>() is INotificationServiceCallback callback)
725
var languageServices =
Services
.GetLanguageServices(languageName);
747
var metadataService =
Services
.GetRequiredService<IMetadataService>();
Microsoft.CodeAnalysis.Workspaces.UnitTests (60)
Editing\SyntaxEditorTests.cs (2)
30
var formatted = Formatter.Format(node, EmptyWorkspace.
Services
.SolutionServices, options, CancellationToken.None);
36
=> new(root, EmptyWorkspace.
Services
.SolutionServices);
FindAllDeclarationsTests.TestSolutionsAndProject.cs (1)
82
var remoteHostProvider = (InProcRemoteHostClientProvider)workspace.
Services
.GetRequiredService<IRemoteHostClientProvider>();
FormattingTests.cs (3)
32
var service = workspace.
Services
.GetLanguageServices(LanguageNames.CSharp).GetService<ISyntaxFormattingService>();
54
var service = workspace.
Services
.GetLanguageServices(LanguageNames.VisualBasic).GetService<ISyntaxFormattingService>();
76
var formattedRoot = Formatter.Format(tree.GetRoot(), workspace.
Services
.SolutionServices, options, CancellationToken.None);
Remote\ServiceDescriptorTests.cs (1)
227
var languageServices = workspace.
Services
.SolutionServices.GetLanguageServices(language);
SolutionTests\SolutionTests.cs (14)
2850
.AddProject(ProjectInfo.Create(pm1, VersionStamp.Create(), "goo", "goo.dll", LanguageNames.CSharp, compilationOptions: workspace.
Services
3330
.AddDocument(did, "x", new WorkspaceFileTextLoader(workspace.
Services
.SolutionServices, file.Path, Encoding.UTF8));
3379
.AddDocument(did, "x", new WorkspaceFileTextLoader(workspace.
Services
.SolutionServices, file.Path, Encoding.UTF8));
3446
.AddDocument(did, "x", new WorkspaceFileTextLoader(workspace.
Services
.SolutionServices, file.Path, Encoding.UTF8));
3875
var service = ws.
Services
.GetLanguageServices(LanguageNames.CSharp).GetService<ITestLanguageService>();
3879
var service2 = ws2.
Services
.GetLanguageServices(LanguageNames.CSharp).GetService<ITestLanguageService>();
4005
var options = solution.Workspace.
Services
4065
compilationOptions: workspace.
Services
4270
compilationOptions: workspace.
Services
5359
compilationOptions: workspace.
Services
5373
compilationOptions: workspace.
Services
5387
compilationOptions: workspace.
Services
5401
compilationOptions: workspace.
Services
5433
var optionService = workspace.
Services
.GetRequiredService<ILegacyWorkspaceOptionService>().LegacyGlobalOptions;
SolutionTests\SolutionWithSourceGeneratorTests.cs (5)
1405
var mefServices = (VisualStudioMefHostServices)workspace.
Services
.HostServices;
1408
var configService = (TestWorkspaceConfigurationService)workspace.
Services
.GetRequiredService<IWorkspaceConfigurationService>();
1413
var workspaceConfigurationService = workspace.
Services
.GetRequiredService<IWorkspaceConfigurationService>();
1428
var analyzerAssemblyLoaderProvider = workspace.
Services
.GetRequiredService<IAnalyzerAssemblyLoaderProvider>();
1495
var configService = (TestWorkspaceConfigurationService)workspace.
Services
.GetRequiredService<IWorkspaceConfigurationService>();
UtilityTest\SourceTextSerializationTests.cs (1)
25
var textService = Assert.IsType<TextFactoryService>(workspace.
Services
.GetService<ITextFactoryService>());
WorkspaceServiceTests\GlobalOptionServiceTests.cs (13)
32
var optionService = GetLegacyGlobalOptionService(workspace.
Services
);
56
var optionService = GetLegacyGlobalOptionService(workspace1.
Services
);
93
var optionService = GetLegacyGlobalOptionService(workspace1.
Services
);
146
var optionService = GetLegacyGlobalOptionService(workspace.
Services
);
157
var optionService = GetLegacyGlobalOptionService(workspace.
Services
);
167
var globalOptions = GetGlobalOptionService(workspace.
Services
);
210
var optionService = GetLegacyGlobalOptionService(workspace.
Services
);
223
var optionSet = new SolutionOptionSet(GetLegacyGlobalOptionService(workspace.
Services
));
242
var optionService = GetLegacyGlobalOptionService(workspace.
Services
);
258
var optionService = GetLegacyGlobalOptionService(workspace.
Services
);
280
var optionService = GetLegacyGlobalOptionService(workspace.
Services
);
299
var optionService = GetLegacyGlobalOptionService(workspace.
Services
);
315
var optionService = GetLegacyGlobalOptionService(workspace.
Services
);
WorkspaceServiceTests\TemporaryStorageServiceTests.cs (18)
34
var textFactory = Assert.IsType<TextFactoryService>(workspace.
Services
.GetService<ITextFactoryService>());
35
var service = Assert.IsType<TemporaryStorageService>(workspace.
Services
.GetRequiredService<ITemporaryStorageServiceInternal>());
54
var textFactory = Assert.IsType<TextFactoryService>(workspace.
Services
.GetService<ITextFactoryService>());
55
var service = Assert.IsType<TemporaryStorageService>(workspace.
Services
.GetRequiredService<ITemporaryStorageServiceInternal>());
91
var textFactory = Assert.IsType<TextFactoryService>(workspace.
Services
.GetService<ITextFactoryService>());
92
var service = Assert.IsType<TemporaryStorageService>(workspace.
Services
.GetRequiredService<ITemporaryStorageServiceInternal>());
109
var textFactory = Assert.IsType<TextFactoryService>(workspace.
Services
.GetService<ITextFactoryService>());
110
var service = Assert.IsType<TemporaryStorageService>(workspace.
Services
.GetRequiredService<ITemporaryStorageServiceInternal>());
151
var textFactory = Assert.IsType<TextFactoryService>(workspace.
Services
.GetService<ITextFactoryService>());
152
var service = Assert.IsType<TemporaryStorageService>(workspace.
Services
.GetRequiredService<ITemporaryStorageServiceInternal>());
181
var textFactory = Assert.IsType<TextFactoryService>(workspace.
Services
.GetService<ITextFactoryService>());
182
var service = Assert.IsType<TemporaryStorageService>(workspace.
Services
.GetRequiredService<ITemporaryStorageServiceInternal>());
206
var textFactory = Assert.IsType<TextFactoryService>(workspace.
Services
.GetService<ITextFactoryService>());
207
var service = Assert.IsType<TemporaryStorageService>(workspace.
Services
.GetRequiredService<ITemporaryStorageServiceInternal>());
241
var textFactory = Assert.IsType<TextFactoryService>(workspace.
Services
.GetService<ITextFactoryService>());
242
var service = Assert.IsType<TemporaryStorageService>(workspace.
Services
.GetRequiredService<ITemporaryStorageServiceInternal>());
276
var textFactory = Assert.IsType<TextFactoryService>(workspace.
Services
.GetService<ITextFactoryService>());
277
var service = Assert.IsType<TemporaryStorageService>(workspace.
Services
.GetRequiredService<ITemporaryStorageServiceInternal>());
WorkspaceTests\AdhocWorkspaceTests.cs (2)
396
: base(solution.Workspace.
Services
.HostServices, solution.Workspace.Kind)
574
var service = ws.
Services
.GetService<IDocumentTextDifferencingService>();
Microsoft.VisualStudio.LanguageServices (68)
CallHierarchy\CallHierarchyDetail.cs (1)
75
var navigator = _workspace.
Services
.GetService<IDocumentNavigationService>();
CodeCleanup\AbstractCodeCleanUpFixer.cs (2)
69
var hierarchyToProjectMap = _workspace.
Services
.GetRequiredService<IHierarchyItemToProjectIdMap>();
175
var workspaceStatusService = workspace.
Services
.GetService<IWorkspaceStatusService>();
CodeLens\CodeLensCallbackListener.cs (4)
70
var service = _workspace.
Services
.GetRequiredService<ICodeLensReferencesService>();
104
var service = _workspace.
Services
.GetRequiredService<ICodeLensReferencesService>();
136
var service = _workspace.
Services
.GetRequiredService<ICodeLensReferencesService>();
172
var service = _workspace.
Services
.GetRequiredService<ICodeLensReferencesService>();
DebuggerIntelliSense\DebuggerIntellisenseWorkspace.cs (1)
13
: base(solution.Workspace.
Services
.HostServices, WorkspaceKind.Debugger)
DesignerAttribute\VisualStudioDesignerAttributeService.cs (1)
117
var statusService = _workspace.
Services
.GetRequiredService<IWorkspaceStatusService>();
Diagnostics\VisualStudioDiagnosticAnalyzerProvider.WorkspaceEventListener.cs (1)
38
var setter = workspace.
Services
.GetService<ISolutionAnalyzerSetterWorkspaceService>();
Diagnostics\VisualStudioDiagnosticAnalyzerService.cs (2)
50
private readonly ICodeAnalysisDiagnosticAnalyzerService _codeAnalysisService = workspace.
Services
.GetRequiredService<ICodeAnalysisDiagnosticAnalyzerService>();
226
var projectMap = _workspace.
Services
.GetRequiredService<IHierarchyItemToProjectIdMap>();
EditorConfigSettings\SettingsEditorFactory.cs (1)
121
var settingsDataProviderFactory = workspace.
Services
.GetRequiredService<ISettingsAggregator>();
ExternalAccess\LegacyCodeAnalysis\LegacyCodeAnalysisVisualStudioSuppressionFixServiceAccessor.cs (3)
37
var errorReportingService = _workspace.
Services
.GetRequiredService<IErrorReportingService>();
59
var errorReportingService = _workspace.
Services
.GetRequiredService<IErrorReportingService>();
81
var errorReportingService = _workspace.
Services
.GetRequiredService<IErrorReportingService>();
Implementation\AbstractEditorFactory.cs (1)
348
var formattedRoot = Formatter.Format(rootToFormat, workspace.
Services
.SolutionServices, cleanupOptions.FormattingOptions, cancellationToken);
InlineRename\InlineRenameUndoManager.cs (1)
92
var textUndoHistoryService = workspace.
Services
.GetService<ITextUndoHistoryWorkspaceService>();
LanguageService\AbstractCreateServicesOnTextViewConnection.cs (1)
111
var languageServices = Workspace.
Services
.GetExtendedLanguageServices(_languageName);
LanguageService\AbstractLanguageService`2.cs (2)
69
var formatter = this.Workspace.Value.
Services
.GetLanguageServices(RoslynLanguageName).GetService<ISyntaxFormattingService>();
156
var languageServices = this.Workspace.Value.
Services
.GetLanguageServices(RoslynLanguageName);
LanguageService\AbstractLanguageService`2.IVsLanguageTextOps.cs (1)
71
var ruleFactory = Workspace.Value.
Services
.GetService<IHostDependentFormattingRuleFactoryService>();
LanguageService\AbstractPackage`2.cs (2)
139
_packageInstallerService = workspace.
Services
.GetService<IPackageInstallerService>() as PackageInstallerService;
140
_symbolSearchService = workspace.
Services
.GetService<ISymbolSearchService>() as VisualStudioSymbolSearchService;
Library\ObjectBrowser\AbstractObjectBrowserLibraryManager.cs (1)
59
_libraryService = new Lazy<ILibraryService>(() => Workspace.
Services
.GetLanguageServices(_languageName).GetService<ILibraryService>());
NavigateTo\VisualStudioNavigateToItemProviderFactory.cs (1)
43
if (_workspace.
Services
.GetRequiredService<IWorkspaceContextService>().IsInLspEditorContext())
Packaging\PackageInstallerServiceFactory.cs (2)
354
var notificationService = Workspace.
Services
.GetService<INotificationService>();
415
var notificationService = Workspace.
Services
.GetService<INotificationService>();
ProjectSystem\MetadataReferences\VisualStudioMetadataReferenceManager.cs (1)
88
_temporaryStorageService = (TemporaryStorageService)workspace.
Services
.GetRequiredService<ITemporaryStorageServiceInternal>();
ProjectSystem\MiscellaneousFilesWorkspace.cs (3)
130
var manager = this.
Services
.GetService<VisualStudioMetadataReferenceManager>();
299
var fileLoader = new WorkspaceFileTextLoader(
Services
.SolutionServices, filePath, defaultEncoding: null);
301
this, filePath, fileLoader, languageInformation, checksumAlgorithm,
Services
.SolutionServices, _metadataReferences.Value);
ProjectSystem\VisualStudioProjectFactory.cs (1)
67
_visualStudioWorkspaceImpl.
Services
.GetRequiredService<VisualStudioMetadataReferenceManager>();
ProjectSystem\VisualStudioWorkspace.cs (1)
78
=> this.
Services
.GetRequiredService<IMetadataService>().GetReference(filePath, properties);
ProjectSystem\VisualStudioWorkspaceImpl.AddMetadataReferenceUndoUnit.cs (1)
40
var documentationProvider = Workspace.
Services
.GetRequiredService<IDocumentationProviderService>();
ProjectSystem\VisualStudioWorkspaceImpl.cs (6)
133
_workspaceListener =
Services
.GetRequiredService<IWorkspaceAsynchronousOperationListenerProvider>().GetListener();
159
var telemetryService = (VisualStudioWorkspaceTelemetryService)
Services
.GetRequiredService<IWorkspaceTelemetryService>();
624
var sourceGeneratedDocumentMappingService =
Services
.GetService<ISourceGeneratedDocumentSpanMappingService>();
685
var documentTrackingService = this.
Services
.GetRequiredService<IDocumentTrackingService>();
1204
var errorReportingService = this.
Services
.GetRequiredService<IErrorReportingService>();
1617
var uiContext =
Services
.GetLanguageServices(language).GetService<IProjectExistsUIContextProviderLanguageService>()?.GetUIContext();
ProjectSystem\VisualStudioWorkspaceImpl.OpenFileTracker.cs (3)
330
w.OnDocumentClosed(documentId, new WorkspaceFileTextLoader(w.
Services
.SolutionServices, moniker, defaultEncoding: null));
334
w.OnAdditionalDocumentClosed(documentId, new WorkspaceFileTextLoader(w.
Services
.SolutionServices, moniker, defaultEncoding: null));
339
w.OnAnalyzerConfigDocumentClosed(documentId, new WorkspaceFileTextLoader(w.
Services
.SolutionServices, moniker, defaultEncoding: null));
ProjectSystem\VisualStudioWorkspaceImpl_SourceGenerators.cs (1)
44
var workspaceStatusService = this.
Services
.GetRequiredService<IWorkspaceStatusService>();
Remote\VisualStudioRemoteHostClientProvider.cs (2)
76
workspaceServices.SolutionServices.WorkspaceServices.HostServices != _vsWorkspace.
Services
.HostServices ||
88
_cachedVSInstance = new VisualStudioRemoteHostClientProvider(_vsWorkspace.
Services
.SolutionServices, _globalOptions, _brokeredServiceContainer, _serviceProvider, _threadingContext, _listenerProvider, _callbackDispatchers);
Remote\VisualStudioWorkspaceServiceHubConnector.cs (1)
44
var service = workspace.
Services
.GetRequiredService<IRemoteHostClientProvider>();
Snippets\SnippetExpansionClient.cs (2)
126
_argumentProviders = [.. workspace.
Services
.SolutionServices.SelectMatchingExtensionValues(ExtensionOrderer.Order(_allArgumentProviders), SubjectBuffer.ContentType)];
1112
var notificationService = workspace.
Services
.GetRequiredService<INotificationService>();
StackTraceExplorer\StackFrameViewModel.cs (2)
41
private readonly IStackTraceExplorerService _stackExplorerService = workspace.
Services
.GetRequiredService<IStackTraceExplorerService>();
120
var navigationService = _workspace.
Services
.GetService<IDocumentNavigationService>();
SymbolSearch\AbstractDelayStartedService.cs (1)
108
var statusService = this.Workspace.
Services
.GetRequiredService<IWorkspaceStatusService>();
SymbolSearch\VisualStudioSymbolSearchService.cs (1)
64
private readonly IPackageInstallerService _installerService = workspace.
Services
.GetRequiredService<IPackageInstallerService>();
SyncNamespaces\SyncNamespacesCommandHandler.cs (1)
145
var previewChangeService = _workspace.
Services
.GetRequiredService<IPreviewDialogService>();
TableDataSource\Suppression\VisualStudioSuppressionFixService.cs (5)
56
private readonly IFixMultipleOccurrencesService _fixMultipleOccurencesService = workspace.
Services
.GetRequiredService<IFixMultipleOccurrencesService>();
61
private readonly IHierarchyItemToProjectIdMap _projectMap = workspace.
Services
.GetRequiredService<IHierarchyItemToProjectIdMap>();
349
_workspace.
Services
.GetRequiredService<IDiagnosticAnalyzerService>().RequestDiagnosticRefresh();
485
var diagnosticService = _workspace.
Services
.GetRequiredService<IDiagnosticAnalyzerService>();
564
var diagnosticService = _workspace.
Services
.GetRequiredService<IDiagnosticAnalyzerService>();
TaskList\ExternalErrorDiagnosticUpdateSource.cs (1)
92
_workspace.
Services
.GetRequiredService<ICodeAnalysisDiagnosticAnalyzerService>().Clear();
UnusedReferences\RemoveUnusedReferencesCommandHandler.cs (1)
43
=> _workspace.
Services
.GetRequiredService<IReferenceCleanupService>();
ValueTracking\ValueTrackedTreeItemViewModel.cs (1)
181
var navigationService = Workspace.
Services
.GetService<IDocumentNavigationService>();
Venus\ContainedDocument.cs (3)
604
_workspace.
Services
.GetLanguageServices(_project.Language).GetService<IContentTypeLanguageService>().GetDefaultContentType());
974
var service = _workspace.
Services
.GetLanguageServices(_project.Language).GetService<IVenusBraceMatchingService>();
998
var syntaxFact = _workspace.
Services
.GetLanguageServices(_project.Language).GetService<ISyntaxFactsService>();
Venus\ContainedLanguage.cs (1)
83
_diagnosticAnalyzerService = workspace.
Services
.GetRequiredService<IDiagnosticAnalyzerService>();
Workspace\VisualStudioSymbolNavigationService.cs (1)
166
var navigationService = editorWorkspace.
Services
.GetRequiredService<IDocumentNavigationService>();
Microsoft.VisualStudio.LanguageServices.CSharp (6)
CSharpPackage.cs (1)
75
return new TempPECompilerService(workspace.
Services
.GetService<IMetadataService>());
Interactive\CSharpVsInteractiveWindowProvider.cs (1)
70
workspace.
Services
.HostServices,
Options\NamingStylesOptionPage.cs (1)
28
_notificationService = workspace.
Services
.GetService<INotificationService>();
ProjectSystemShim\CSharpProjectShim.cs (1)
69
this.ProjectSystemProjectOptionsProcessor = new OptionsProcessor(this.ProjectSystemProject, Workspace.
Services
.SolutionServices);
SemanticSearch\SemanticSearchToolWindowImpl.cs (2)
82
hostWorkspaceProvider.Workspace.
Services
.HostServices,
442
var previewDialogService = workspace.
Services
.GetService<IPreviewDialogService>();
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (7)
EditorConfigSettings\Aggregator\SettingsAggregatorTests.cs (1)
41
var settingsAggregator = workspace.
Services
.GetRequiredService<ISettingsAggregator>();
EditorConfigSettings\DataProvider\DataProviderTests.cs (4)
40
=> GetWorkspace("/a/b/proj1.csproj").
Services
.GetRequiredService<IWorkspaceSettingsProviderFactory<T>>();
43
=> GetWorkspace("/a/b/proj1.csproj").
Services
.GetLanguageServices(languageName).GetRequiredService<ILanguageSettingsProviderFactory<T>>();
46
=> GetWorkspace().
Services
.GetRequiredService<IWorkspaceSettingsProviderFactory<T>>();
49
=> GetWorkspace().
Services
.GetLanguageServices(languageName).GetRequiredService<ILanguageSettingsProviderFactory<T>>();
F1Help\F1HelpTests.cs (1)
29
var service = Assert.IsType<CSharpHelpContextService>(workspace.
Services
.GetLanguageServices(LanguageNames.CSharp).GetService<IHelpContextService>());
PersistentStorage\AbstractPersistentStorageTests.cs (1)
841
var configuration = workspace.
Services
.GetRequiredService<IPersistentStorageConfiguration>();
Microsoft.VisualStudio.LanguageServices.Implementation (11)
Options\AbstractOptionPreviewViewModel.cs (1)
129
var metadataService = workspace.
Services
.GetService<IMetadataService>();
ProjectSystem\CPS\CPSProject_IWorkspaceProjectContext.cs (2)
87
if (visualStudioWorkspace.
Services
.GetLanguageServices(projectSystemProject.Language).GetService<ICommandLineParserService>() != null)
89
_projectSystemProjectOptionsProcessor = new ProjectSystemProjectOptionsProcessor(_projectSystemProject, visualStudioWorkspace.
Services
.SolutionServices);
RoslynVisualStudioWorkspace.cs (1)
57
var globalUndoService = this.
Services
.GetRequiredService<IGlobalUndoService>();
SolutionExplorer\AnalyzersCommandHandler.cs (1)
647
var notificationService = workspace.
Services
.GetService<INotificationService>();
SolutionExplorer\AnalyzersFolderItem\AnalyzersFolderItemSourceProvider.cs (1)
77
=> _projectMap ??= _workspace.
Services
.GetService<IHierarchyItemToProjectIdMap>();
SolutionExplorer\DiagnosticItem\CpsDiagnosticItemSourceProvider.cs (1)
161
_projectMap ??= _workspace.
Services
.GetService<IHierarchyItemToProjectIdMap>();
SolutionExplorer\Search\RoslynSolutionExplorerSearchProvider.cs (1)
117
var statusService = workspace.
Services
.GetRequiredService<IWorkspaceStatusService>();
SolutionExplorer\SolutionExplorerNavigationSupport.cs (1)
30
var navigationService = workspace.
Services
.GetRequiredService<IDocumentNavigationService>();
SolutionExplorer\SourceGeneratedFileItems\SourceGeneratedFileItem.cs (1)
57
var documentNavigationService = item.Workspace.
Services
.GetService<IDocumentNavigationService>();
SolutionExplorer\SymbolTree\RootSymbolTreeItemCollectionSource.cs (1)
102
var idMap = _rootProvider._workspace.
Services
.GetRequiredService<IHierarchyItemToProjectIdMap>();
Microsoft.VisualStudio.LanguageServices.LiveShare (3)
Client\Projects\RoslynRemoteProjectInfoProvider.cs (1)
80
var projectInfo = CreateProjectInfo(project.Name, project.Language, [.. files.Select(f => f.LocalPath)], _remoteLanguageServiceWorkspace.
Services
.SolutionServices);
Client\RemoteLanguageServiceWorkspace.cs (2)
337
loader: new WorkspaceFileTextLoader(
Services
.SolutionServices, filePath, defaultEncoding: null),
372
OnDocumentClosed(id, new WorkspaceFileTextLoaderNoException(
Services
.SolutionServices, moniker, defaultEncoding: null));
Roslyn.Diagnostics.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ISolutionExtensions.cs (1)
174
=> solution.Workspace.
Services
.GetExtendedLanguageServices(languageName);
Roslyn.VisualStudio.DiagnosticsWindow (2)
OptionPages\PerformanceLoggersPage.cs (1)
42
_workspaceServices = workspace.
Services
.SolutionServices;
VisualStudioDiagnosticsWindowPackage.cs (1)
94
PerformanceLoggersPage.SetLoggers(globalOptions, _threadingContext, _workspace.
Services
.SolutionServices);
Roslyn.VisualStudio.Next.UnitTests (124)
Remote\RemoteHostClientServiceFactoryTests.cs (3)
35
var exportProvider = workspace.
Services
.SolutionServices.ExportProvider;
40
var service = workspace.
Services
.GetRequiredService<IRemoteHostClientProvider>();
74
var service = workspace.
Services
.GetRequiredService<IRemoteHostClientProvider>();
Remote\SnapshotSerializationTests.cs (26)
86
var validator = new SerializationValidator(workspace.
Services
);
107
var validator = new SerializationValidator(workspace.
Services
);
119
var validator = new SerializationValidator(workspace.
Services
);
141
var validator = new SerializationValidator(workspace.
Services
);
155
var validator = new SerializationValidator(workspace.
Services
);
175
var validator = new SerializationValidator(workspace.
Services
);
190
var validator = new SerializationValidator(workspace.
Services
);
209
var validator = new SerializationValidator(workspace.
Services
);
221
var validator = new SerializationValidator(workspace.
Services
);
235
var validator = new SerializationValidator(workspace.
Services
);
256
var validator = new SerializationValidator(workspace.
Services
);
284
var serializer = workspace.
Services
.GetService<ISerializerService>();
297
var validator = new SerializationValidator(workspace.
Services
);
337
var validator = new SerializationValidator(workspace.
Services
);
376
var serializer = workspace.
Services
.GetService<ISerializerService>();
390
var serializer = workspace.
Services
.GetService<ISerializerService>();
404
var serializer = workspace.
Services
.GetService<ISerializerService>();
420
var serializer = workspace.
Services
.GetService<ISerializerService>();
441
var serializer = workspace.
Services
.GetService<ISerializerService>();
463
var serializer = workspace.
Services
.GetService<ISerializerService>();
490
var validator = new SerializationValidator(workspace.
Services
);
509
var validator = new SerializationValidator(workspace.
Services
);
522
var validator = new SerializationValidator(workspace.
Services
);
588
var validator = new SerializationValidator(workspace.
Services
);
606
var serializer = workspace.
Services
.GetService<ISerializerService>();
652
var serializer = workspace.
Services
.GetService<ISerializerService>();
Services\AssetProviderTests.cs (10)
51
var assetSource = new SimpleAssetSource(workspace.
Services
.GetService<ISerializerService>(), new Dictionary<Checksum, object>() { { checksum, data } });
53
var provider = new AssetProvider(sessionId, storage, assetSource, remoteWorkspace.
Services
.SolutionServices);
82
var assetSource = new SimpleAssetSource(workspace.
Services
.GetService<ISerializerService>(), map);
84
var service = new AssetProvider(sessionId, storage, assetSource, remoteWorkspace.
Services
.SolutionServices);
110
var assetSource = new SimpleAssetSource(workspace.
Services
.GetService<ISerializerService>(), map);
112
var service = new AssetProvider(sessionId, storage, assetSource, remoteWorkspace.
Services
.SolutionServices);
135
var assetSource = new SimpleAssetSource(workspace.
Services
.GetService<ISerializerService>(), map);
137
var service = new AssetProvider(sessionId, storage, assetSource, remoteWorkspace.
Services
.SolutionServices);
164
var assetSource = new OrderedAssetSource(workspace.
Services
.GetService<ISerializerService>(), map);
166
var service = new AssetProvider(sessionId, storage, assetSource, remoteWorkspace.
Services
.SolutionServices);
Services\ServiceHubServicesTests.cs (11)
57
var clientProvider = (InProcRemoteHostClientProvider)workspace.
Services
.GetService<IRemoteHostClientProvider>();
134
var assetSource = new SimpleAssetSource(workspace.
Services
.GetService<ISerializerService>(), map);
136
return new AssetProvider(sessionId, storage, assetSource, remoteWorkspace.
Services
.SolutionServices);
729
var workspaceConfigurationService = workspace.
Services
.GetRequiredService<IWorkspaceConfigurationService>();
813
var workspaceConfigurationService = workspace.
Services
.GetRequiredService<IWorkspaceConfigurationService>();
868
var workspaceConfigurationService = workspace.
Services
.GetRequiredService<IWorkspaceConfigurationService>();
1423
var workspaceConfigurationService = workspace.
Services
.GetRequiredService<IWorkspaceConfigurationService>();
1495
var workspaceConfigurationService = workspace.
Services
.GetRequiredService<IWorkspaceConfigurationService>();
1579
var workspaceConfigurationService = workspace.
Services
.GetRequiredService<IWorkspaceConfigurationService>();
1658
var workspaceConfigurationService = workspace.
Services
.GetRequiredService<IWorkspaceConfigurationService>();
1856
var service = workspace.
Services
.GetRequiredService<ICopilotChangeAnalysisService>();
Services\ServiceHubServicesTests_ExtensionMessageHandler.cs (44)
33
var extensionMessageHandlerService = workspace.
Services
.GetRequiredService<IExtensionMessageHandlerService>();
38
var errorReportingService = (TestErrorReportingService)workspace.
Services
.GetRequiredService<IErrorReportingService>();
53
var extensionMessageHandlerService = workspace.
Services
.GetRequiredService<IExtensionMessageHandlerService>();
58
var errorReportingService = (TestErrorReportingService)workspace.
Services
.GetRequiredService<IErrorReportingService>();
70
var extensionMessageHandlerService = workspace.
Services
.GetRequiredService<IExtensionMessageHandlerService>();
75
var errorReportingService = (TestErrorReportingService)workspace.
Services
.GetRequiredService<IErrorReportingService>();
93
var extensionMessageHandlerService = workspace.
Services
.GetRequiredService<IExtensionMessageHandlerService>();
98
var errorReportingService = (TestErrorReportingService)workspace.
Services
.GetRequiredService<IErrorReportingService>();
111
var extensionMessageHandlerService = workspace.
Services
.GetRequiredService<IExtensionMessageHandlerService>();
116
var errorReportingService = (TestErrorReportingService)workspace.
Services
.GetRequiredService<IErrorReportingService>();
128
var extensionMessageHandlerService = workspace.
Services
.GetRequiredService<IExtensionMessageHandlerService>();
133
var errorReportingService = (TestErrorReportingService)workspace.
Services
.GetRequiredService<IErrorReportingService>();
149
var assemblyLoaderProvider = (TestExtensionAssemblyLoaderProvider)remoteWorkspace.
Services
.GetRequiredService<IExtensionAssemblyLoaderProvider>();
157
var handlerFactory = (TestExtensionMessageHandlerFactory)remoteWorkspace.
Services
.GetRequiredService<IExtensionMessageHandlerFactory>();
166
var extensionMessageHandlerService = localWorkspace.
Services
.GetRequiredService<IExtensionMessageHandlerService>();
175
var errorReportingService = (TestErrorReportingService)localWorkspace.
Services
.GetRequiredService<IErrorReportingService>();
195
var extensionMessageHandlerService = localWorkspace.
Services
.GetRequiredService<IExtensionMessageHandlerService>();
204
var errorReportingService = (TestErrorReportingService)localWorkspace.
Services
.GetRequiredService<IErrorReportingService>();
223
var extensionMessageHandlerService = localWorkspace.
Services
.GetRequiredService<IExtensionMessageHandlerService>();
232
var errorReportingService = (TestErrorReportingService)localWorkspace.
Services
.GetRequiredService<IErrorReportingService>();
268
var errorReportingService = (TestErrorReportingService)localWorkspace.
Services
.GetRequiredService<IErrorReportingService>();
271
var extensionMessageHandlerService = localWorkspace.
Services
.GetRequiredService<IExtensionMessageHandlerService>();
342
var extensionMessageHandlerService = localWorkspace.
Services
.GetRequiredService<IExtensionMessageHandlerService>();
345
var errorReportingService = (TestErrorReportingService)localWorkspace.
Services
.GetRequiredService<IErrorReportingService>();
367
var extensionMessageHandlerService = localWorkspace.
Services
.GetRequiredService<IExtensionMessageHandlerService>();
370
var errorReportingService = (TestErrorReportingService)localWorkspace.
Services
.GetRequiredService<IErrorReportingService>();
402
var extensionMessageHandlerService = localWorkspace.
Services
.GetRequiredService<IExtensionMessageHandlerService>();
405
var errorReportingService = (TestErrorReportingService)localWorkspace.
Services
.GetRequiredService<IErrorReportingService>();
440
var extensionMessageHandlerService = localWorkspace.
Services
.GetRequiredService<IExtensionMessageHandlerService>();
443
var errorReportingService = (TestErrorReportingService)localWorkspace.
Services
.GetRequiredService<IErrorReportingService>();
487
var extensionMessageHandlerService = localWorkspace.
Services
.GetRequiredService<IExtensionMessageHandlerService>();
490
var errorReportingService = (TestErrorReportingService)localWorkspace.
Services
.GetRequiredService<IErrorReportingService>();
532
var extensionMessageHandlerService = localWorkspace.
Services
.GetRequiredService<IExtensionMessageHandlerService>();
535
var errorReportingService = (TestErrorReportingService)localWorkspace.
Services
.GetRequiredService<IErrorReportingService>();
565
var extensionMessageHandlerService = localWorkspace.
Services
.GetRequiredService<IExtensionMessageHandlerService>();
568
var errorReportingService = (TestErrorReportingService)localWorkspace.
Services
.GetRequiredService<IErrorReportingService>();
597
var extensionMessageHandlerService = localWorkspace.
Services
.GetRequiredService<IExtensionMessageHandlerService>();
600
var errorReportingService = (TestErrorReportingService)localWorkspace.
Services
.GetRequiredService<IErrorReportingService>();
638
var errorReportingService = (TestErrorReportingService)localWorkspace.
Services
.GetRequiredService<IErrorReportingService>();
643
var extensionMessageHandlerService = localWorkspace.
Services
.GetRequiredService<IExtensionMessageHandlerService>();
678
var extensionMessageHandlerService = localWorkspace.
Services
.GetRequiredService<IExtensionMessageHandlerService>();
681
var errorReportingService = (TestErrorReportingService)localWorkspace.
Services
.GetRequiredService<IErrorReportingService>();
721
var extensionMessageHandlerService = localWorkspace.
Services
.GetRequiredService<IExtensionMessageHandlerService>();
726
var errorReportingService = (TestErrorReportingService)localWorkspace.
Services
.GetRequiredService<IErrorReportingService>();
Services\SolutionServiceTests.cs (25)
445
remoteWorkspace.
Services
.SolutionServices,
548
Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())), new SolutionAssetCache(), new SimpleAssetSource(workspace.
Services
.GetService<ISerializerService>(), map), remoteWorkspace.
Services
.SolutionServices);
589
Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())), new SolutionAssetCache(), new SimpleAssetSource(workspace.
Services
.GetService<ISerializerService>(), map), remoteWorkspace.
Services
.SolutionServices);
631
Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())), new SolutionAssetCache(), new SimpleAssetSource(workspace.
Services
.GetService<ISerializerService>(), map), remoteWorkspace.
Services
.SolutionServices);
664
Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())), new SolutionAssetCache(), new SimpleAssetSource(workspace.
Services
.GetService<ISerializerService>(), map), remoteWorkspace.
Services
.SolutionServices);
706
Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())), new SolutionAssetCache(), new SimpleAssetSource(workspace.
Services
.GetService<ISerializerService>(), map), remoteWorkspace.
Services
.SolutionServices);
746
Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())), new SolutionAssetCache(), new SimpleAssetSource(workspace.
Services
.GetService<ISerializerService>(), map), remoteWorkspace.
Services
.SolutionServices);
784
Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())), new SolutionAssetCache(), new SimpleAssetSource(workspace.
Services
.GetService<ISerializerService>(), map), remoteWorkspace.
Services
.SolutionServices);
817
Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())), new SolutionAssetCache(), new SimpleAssetSource(workspace.
Services
.GetService<ISerializerService>(), map), remoteWorkspace.
Services
.SolutionServices);
872
Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())), new SolutionAssetCache(), new SimpleAssetSource(workspace.
Services
.GetService<ISerializerService>(), map), remoteWorkspace.
Services
.SolutionServices);
941
Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())), new SolutionAssetCache(), new SimpleAssetSource(workspace.
Services
.GetService<ISerializerService>(), map), remoteWorkspace.
Services
.SolutionServices);
1129
var remoteDocumentTrackingService = (RemoteDocumentTrackingService)remoteWorkspace.
Services
.GetRequiredService<IDocumentTrackingService>();
1203
var documentTrackingService = (TestDocumentTrackingService)workspace.
Services
.GetRequiredService<IDocumentTrackingService>();
1317
var assetSource = new SimpleAssetSource(workspace.
Services
.GetRequiredService<ISerializerService>(), map);
1319
return new AssetProvider(sessionId, storage, assetSource, remoteWorkspace.
Services
.SolutionServices);
Services\VisualStudioDiagnosticAnalyzerExecutorTests.cs (5)
158
var diagnosticAnalyzerService = (DiagnosticAnalyzerService)workspace.
Services
.GetRequiredService<IDiagnosticAnalyzerService>();
191
var remotableDataService = workspace.
Services
.GetService<ISolutionAssetStorageProvider>();
192
var serializer = workspace.
Services
.GetRequiredService<ISerializerService>();
197
var diagnosticAnalyzerService = (DiagnosticAnalyzerService)workspace.
Services
.GetRequiredService<IDiagnosticAnalyzerService>();
215
var diagnosticAnalyzerService = (DiagnosticAnalyzerService)workspace.
Services
.GetRequiredService<IDiagnosticAnalyzerService>();
Text.Analyzers (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Extensions\ISolutionExtensions.cs (1)
174
=> solution.Workspace.
Services
.GetExtendedLanguageServices(languageName);