664 references to Services
AnalyzerRunner (4)
IdeBenchmarks (2)
IdeCoreBenchmarks (2)
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (19)
Microsoft.CodeAnalysis.CSharp.Workspaces.UnitTests (12)
Formatting\FormattingElasticTriviaTests.cs (5)
94var newCompilation = Formatter.Format(compilation, workspace.Services.SolutionServices, CSharpSyntaxFormattingOptions.Default, CancellationToken.None);
134var formatted = Formatter.Format(newRoot, workspace.Services.SolutionServices, options, CancellationToken.None).ToFullString();
137var elasticOnlyFormatted = Formatter.Format(newRoot, SyntaxAnnotation.ElasticAnnotation, workspace.Services.SolutionServices, options, CancellationToken.None).ToFullString();
140var annotationFormatted = Formatter.Format(newRoot, Formatter.Annotation, workspace.Services.SolutionServices, options, CancellationToken.None).ToFullString();
195var newCompilation = Formatter.Format(compilation, workspace.Services.SolutionServices, CSharpSyntaxFormattingOptions.Default, CancellationToken.None);
Microsoft.CodeAnalysis.EditorFeatures (59)
Microsoft.CodeAnalysis.EditorFeatures.Cocoa (13)
Microsoft.CodeAnalysis.EditorFeatures.DiagnosticsTests.Utilities (2)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (24)
Formatting\CoreFormatterTestsBase.cs (6)
98if (workspace.Services.GetService<IHostDependentFormattingRuleFactoryService>() is TestFormattingRuleFactoryServiceFactory.Factory factory && factory.BaseIndentation != 0 && factory.TextSpan.Contains(p.Position))
193var formattingRuleProvider = workspace.Services.GetService<IHostDependentFormattingRuleFactoryService>();
216var newRootNode = Formatter.Format(root, spans, workspace.Services.SolutionServices, options, rules, CancellationToken.None);
229var result = Formatter.GetFormattedTextChanges(root, spans, workspace.Services.SolutionServices, options, rules, CancellationToken.None);
289var formattingService = workspace.Services.GetLanguageServices(node.Language).GetRequiredService<ISyntaxFormattingService>();
291var result = Formatter.Format(node, workspace.Services.SolutionServices, options, CancellationToken.None);
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (65)
Diagnostics\DiagnosticAnalyzerServiceTests.cs (16)
56=> workspace.Services.SolutionServices.ExportProvider.GetExportedValue<IGlobalOptionService>();
62var documentTrackingService = (TestDocumentTrackingService)workspace.Services.GetRequiredService<IDocumentTrackingService>();
76var exportProvider = workspace.Services.SolutionServices.ExportProvider;
201var exportProvider = workspace.Services.SolutionServices.ExportProvider;
251var exportProvider = workspace.Services.SolutionServices.ExportProvider;
285var exportProvider = workspace.Services.SolutionServices.ExportProvider;
368var exportProvider = workspace.Services.SolutionServices.ExportProvider;
419var exportProvider = workspace.Services.SolutionServices.ExportProvider;
491var exportProvider = workspace.Services.SolutionServices.ExportProvider;
596var exportProvider = workspace.Services.SolutionServices.ExportProvider;
655var exportProvider = workspace.Services.SolutionServices.ExportProvider;
784var documentTrackingService = (TestDocumentTrackingService)workspace.Services.GetService<IDocumentTrackingService>();
919var documentTrackingService = (TestDocumentTrackingService)workspace.Services.GetRequiredService<IDocumentTrackingService>();
1069AnalysisKind.Semantic, new DiagnosticAnalyzerInfoCache(), workspace.Services,
1124analyzerIds, kind, diagnosticAnalyzerInfoCache, workspace.Services, reportSuppressedDiagnostics: false,
1137analyzerIds, kind, diagnosticAnalyzerInfoCache, workspace.Services, reportSuppressedDiagnostics: false,
Microsoft.CodeAnalysis.EditorFeatures.Wpf (23)
Microsoft.CodeAnalysis.EditorFeatures2.UnitTests (76)
Diagnostics\DiagnosticServiceTests.vb (28)
340Dim mefExportProvider = DirectCast(workspace.Services.HostServices, IMefHostExportProvider)
487Dim mefExportProvider = DirectCast(workspace.Services.HostServices, IMefHostExportProvider)
523Dim mefExportProvider = DirectCast(workspace.Services.HostServices, IMefHostExportProvider)
597Dim mefExportProvider = DirectCast(workspace.Services.HostServices, IMefHostExportProvider)
621Dim mefExportProvider = DirectCast(workspace.Services.HostServices, IMefHostExportProvider)
664Dim mefExportProvider = DirectCast(workspace.Services.HostServices, IMefHostExportProvider)
699Dim mefExportProvider = DirectCast(workspace.Services.HostServices, IMefHostExportProvider)
776Dim mefExportProvider = DirectCast(workspace.Services.HostServices, IMefHostExportProvider)
813Dim mefExportProvider = DirectCast(workspace.Services.HostServices, IMefHostExportProvider)
970Dim mefExportProvider = DirectCast(workspace.Services.HostServices, IMefHostExportProvider)
1009Dim mefExportProvider = DirectCast(workspace.Services.HostServices, IMefHostExportProvider)
1066Dim mefExportProvider = DirectCast(workspace.Services.HostServices, IMefHostExportProvider)
1117Dim mefExportProvider = DirectCast(workspace.Services.HostServices, IMefHostExportProvider)
1161Dim mefExportProvider = DirectCast(workspace.Services.HostServices, IMefHostExportProvider)
1205Dim mefExportProvider = DirectCast(workspace.Services.HostServices, IMefHostExportProvider)
1258Dim mefExportProvider = DirectCast(workspace.Services.HostServices, IMefHostExportProvider)
1322Dim mefExportProvider = DirectCast(workspace.Services.HostServices, IMefHostExportProvider)
1370Dim mefExportProvider = DirectCast(workspace.Services.HostServices, IMefHostExportProvider)
1442Dim mefExportProvider = DirectCast(workspace.Services.HostServices, IMefHostExportProvider)
1993Dim mefExportProvider = DirectCast(workspace.Services.HostServices, IMefHostExportProvider)
2054Dim mefExportProvider = DirectCast(workspace.Services.HostServices, IMefHostExportProvider)
2122Dim mefExportProvider = DirectCast(workspace.Services.HostServices, IMefHostExportProvider)
2162Dim mefExportProvider = DirectCast(workspace.Services.HostServices, IMefHostExportProvider)
2223Dim mefExportProvider = DirectCast(workspace.Services.HostServices, IMefHostExportProvider)
2265Dim mefExportProvider = DirectCast(workspace.Services.HostServices, IMefHostExportProvider)
2313Dim mefExportProvider = DirectCast(workspace.Services.HostServices, IMefHostExportProvider)
2364Dim mefExportProvider = DirectCast(workspace.Services.HostServices, IMefHostExportProvider)
2435Dim mefExportProvider = DirectCast(workspace.Services.HostServices, IMefHostExportProvider)
Microsoft.CodeAnalysis.ExternalAccess.FSharp (10)
Microsoft.CodeAnalysis.Features (33)
Microsoft.CodeAnalysis.LanguageServer.Protocol (5)
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (2)
Microsoft.CodeAnalysis.LanguageServerIndexFormat.Generator (1)
Microsoft.CodeAnalysis.Remote.ServiceHub (14)
Microsoft.CodeAnalysis.VisualBasic.EditorFeatures.UnitTests (6)
Microsoft.CodeAnalysis.VisualBasic.Workspaces.UnitTests (8)
Formatting\FormattingTests.vb (4)
3021Dim result = Formatter.GetFormattedTextChanges(root, workspace.Services.SolutionServices, options, CancellationToken.None)
3028Dim result2 = Formatter.GetFormattedTextChanges(root, workspace.Services.SolutionServices, options, CancellationToken.None)
3788Dim result = Formatter.Format(root, goo, workspace.Services.SolutionServices, VisualBasicSyntaxFormattingOptions.Default, CancellationToken.None).ToString()
4605Dim formatted = Formatter.Format(tree, workspace.Services.SolutionServices, options, CancellationToken.None)
Formatting\VisualBasicFormattingTestBase.vb (4)
67Dim changes = Formatter.GetFormattedTextChanges(Await syntaxTree.GetRootAsync(), workspace.Services.SolutionServices, options, CancellationToken.None)
70changes = Formatter.GetFormattedTextChanges(Await syntaxTree.GetRootAsync(), (Await syntaxTree.GetRootAsync()).FullSpan, workspace.Services.SolutionServices, options, CancellationToken.None)
76changes = Formatter.GetFormattedTextChanges(Await syntaxTree.GetRootAsync(), spans, workspace.Services.SolutionServices, options, CancellationToken.None)
80AssertFormatWithTransformation(workspace.Services.SolutionServices, expected, syntaxTree.GetRoot(), spans, options, False)
Microsoft.CodeAnalysis.Workspaces (25)
Microsoft.CodeAnalysis.Workspaces.MSBuild (4)
Microsoft.CodeAnalysis.Workspaces.MSBuild.UnitTests (7)
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
Formatting\FormattingTestBase.cs (2)
63await AssertFormatAsync(workspace.Services.SolutionServices, expected, root, spans.AsImmutable(), formattingOptions, await document.GetTextAsync());
66AssertFormatWithTransformation(workspace.Services.SolutionServices, expected, root, spans, formattingOptions, treeCompare, parseOptions);
Microsoft.CodeAnalysis.Workspaces.UnitTests (53)
SolutionTests\SolutionTests.cs (8)
2653.AddDocument(did, "x", new WorkspaceFileTextLoader(workspace.Services.SolutionServices, file.Path, Encoding.UTF8));
2665Assert.IsType<TemporaryStorageService>(workspace.Services.GetService<ITemporaryStorageServiceInternal>());
2672Assert.IsType<TrivialTemporaryStorageService>(workspace.Services.GetService<ITemporaryStorageServiceInternal>());
2712.AddDocument(did, "x", new WorkspaceFileTextLoader(workspace.Services.SolutionServices, file.Path, Encoding.UTF8));
2779.AddDocument(did, "x", new WorkspaceFileTextLoader(workspace.Services.SolutionServices, file.Path, Encoding.UTF8));
3204var service = ws.Services.GetLanguageServices(LanguageNames.CSharp).GetService<ITestLanguageService>();
3208var service2 = ws2.Services.GetLanguageServices(LanguageNames.CSharp).GetService<ITestLanguageService>();
4258var optionService = workspace.Services.GetRequiredService<ILegacyWorkspaceOptionService>().LegacyGlobalOptions;
Microsoft.VisualStudio.IntegrationTest.Utilities (1)
Microsoft.VisualStudio.LanguageServices (76)
Microsoft.VisualStudio.LanguageServices.CSharp (4)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (24)
PersistentStorage\AbstractPersistentStorageTests.cs (18)
498await using (var storage = await GetStorageFromKeyAsync(solution.Workspace.Services, SolutionKey.ToSolutionKey(solution)))
519await using (var storage = await GetStorageFromKeyAsync(solution.Workspace.Services, SolutionKey.ToSolutionKey(solution)))
630await using (var storage = await GetStorageFromKeyAsync(solution.Workspace.Services, SolutionKey.ToSolutionKey(solution)))
654await using (var storage = await GetStorageFromKeyAsync(solution.Workspace.Services, SolutionKey.ToSolutionKey(solution)))
673await using (var storage = await GetStorageFromKeyAsync(solution.Workspace.Services, SolutionKey.ToSolutionKey(solution)))
678await using (var storage = await GetStorageFromKeyAsync(solution.Workspace.Services, SolutionKey.ToSolutionKey(solution)))
694await using (var storage = await GetStorageFromKeyAsync(solution.Workspace.Services, SolutionKey.ToSolutionKey(solution)))
699await using (var storage = await GetStorageFromKeyAsync(solution.Workspace.Services, SolutionKey.ToSolutionKey(solution)))
715await using (var storage = await GetStorageFromKeyAsync(solution.Workspace.Services, SolutionKey.ToSolutionKey(solution)))
736await using (var storage = await GetStorageFromKeyAsync(solution.Workspace.Services, SolutionKey.ToSolutionKey(solution)))
757await using (var storage = await GetStorageFromKeyAsync(solution.Workspace.Services, SolutionKey.ToSolutionKey(solution)))
781await using (var storage = await GetStorageFromKeyAsync(solution.Workspace.Services, SolutionKey.ToSolutionKey(solution)))
805await using (var storage = await GetStorageFromKeyAsync(solution.Workspace.Services, SolutionKey.ToSolutionKey(solution)))
810await using (var storage = await GetStorageFromKeyAsync(solution.Workspace.Services, SolutionKey.ToSolutionKey(solution)))
829await using (var storage = await GetStorageFromKeyAsync(solution.Workspace.Services, SolutionKey.ToSolutionKey(solution)))
834await using (var storage = await GetStorageFromKeyAsync(solution.Workspace.Services, SolutionKey.ToSolutionKey(solution)))
850var configuration = workspace.Services.GetRequiredService<IPersistentStorageConfiguration>();
1018_storageService = GetStorageService(solution.Workspace.Services.SolutionServices.ExportProvider, configuration, faultInjector, _persistentFolder.Path);
Microsoft.VisualStudio.LanguageServices.Implementation (8)
Microsoft.VisualStudio.LanguageServices.LiveShare (3)
Microsoft.VisualStudio.LanguageServices.Test.Utilities2 (2)
Microsoft.VisualStudio.LanguageServices.UnitTests (9)
Microsoft.VisualStudio.LanguageServices.VisualBasic (3)
Roslyn.VisualStudio.DiagnosticsWindow (2)
Roslyn.VisualStudio.Next.UnitTests (60)
Services\AssetProviderTests.cs (8)
53var assetSource = new SimpleAssetSource(workspace.Services.GetService<ISerializerService>(), new Dictionary<Checksum, object>() { { checksum, data } });
55var provider = new AssetProvider(sessionId, storage, assetSource, remoteWorkspace.Services.GetService<ISerializerService>());
83var assetSource = new SimpleAssetSource(workspace.Services.GetService<ISerializerService>(), map);
85var service = new AssetProvider(sessionId, storage, assetSource, remoteWorkspace.Services.GetService<ISerializerService>());
111var assetSource = new SimpleAssetSource(workspace.Services.GetService<ISerializerService>(), map);
113var service = new AssetProvider(sessionId, storage, assetSource, remoteWorkspace.Services.GetService<ISerializerService>());
136var assetSource = new SimpleAssetSource(workspace.Services.GetService<ISerializerService>(), map);
138var service = new AssetProvider(sessionId, storage, assetSource, remoteWorkspace.Services.GetService<ISerializerService>());
Services\SolutionServiceTests.cs (15)
341remoteWorkspace.Services.GetRequiredService<ISolutionCrawlerRegistrationService>().Register(remoteWorkspace);
569Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())), new SolutionAssetCache(), new SimpleAssetSource(workspace.Services.GetService<ISerializerService>(), map), remoteWorkspace.Services.GetService<ISerializerService>());
611Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())), new SolutionAssetCache(), new SimpleAssetSource(workspace.Services.GetService<ISerializerService>(), map), remoteWorkspace.Services.GetService<ISerializerService>());
644Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())), new SolutionAssetCache(), new SimpleAssetSource(workspace.Services.GetService<ISerializerService>(), map), remoteWorkspace.Services.GetService<ISerializerService>());
686Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())), new SolutionAssetCache(), new SimpleAssetSource(workspace.Services.GetService<ISerializerService>(), map), remoteWorkspace.Services.GetService<ISerializerService>());
724Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())), new SolutionAssetCache(), new SimpleAssetSource(workspace.Services.GetService<ISerializerService>(), map), remoteWorkspace.Services.GetService<ISerializerService>());
760Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())), new SolutionAssetCache(), new SimpleAssetSource(workspace.Services.GetService<ISerializerService>(), map), remoteWorkspace.Services.GetService<ISerializerService>());
857var assetSource = new SimpleAssetSource(workspace.Services.GetService<ISerializerService>(), map);
859return new AssetProvider(sessionId, storage, assetSource, remoteWorkspace.Services.GetService<ISerializerService>());