2 overrides of GetService
Microsoft.CodeAnalysis.CodeStyle.Fixes (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\MefWorkspaceServices.cs (1)
105public override TWorkspaceService GetService<TWorkspaceService>()
Microsoft.CodeAnalysis.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Workspace\Core\Workspace\Mef\MefWorkspaceServices.cs (1)
105public override TWorkspaceService GetService<TWorkspaceService>()
93 references to GetService
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (5)
CodeActions\GenerateEqualsAndGetHashCodeFromMembers\GenerateEqualsAndGetHashCodeFromMembersTests.cs (1)
45var service = (TestPickMembersService)workspace.Services.GetService<IPickMembersService>();
EncapsulateField\EncapsulateFieldTestState.cs (1)
37var notificationService = Workspace.Services.GetService<INotificationService>() as INotificationServiceCallback;
Formatting\Indentation\CSharpFormatterTestsBase.cs (2)
85var formattingRuleProvider = workspace.Services.GetService<IHostDependentFormattingRuleFactoryService>(); 114var factory = (TestFormattingRuleFactoryServiceFactory.Factory)workspace.Services.GetService<IHostDependentFormattingRuleFactoryService>();
Formatting\Indentation\SmartIndenterTests.cs (1)
3465var provider = (TestFormattingRuleFactoryServiceFactory.Factory)workspace.Services.GetService<IHostDependentFormattingRuleFactoryService>();
Microsoft.CodeAnalysis.CSharp.Features (1)
Copilot\CSharpCopilotCodeFixProvider.DismissChangesCodeAction.cs (1)
38if (workspace.Services.GetService<IWorkspaceTelemetryService>()?.IsUserMicrosoftInternal is true)
Microsoft.CodeAnalysis.EditorFeatures (13)
ChangeSignature\AbstractChangeSignatureCommandHandler.cs (1)
123var previewService = workspace.Services.GetService<IPreviewDialogService>();
CodeActions\CodeActionEditHandlerService.cs (1)
113workspace.Services.GetService<INotificationService>()?.SendNotification(
EditAndContinue\ActiveStatementTaggerProvider.EventSource.cs (2)
16var trackingService = workspace.Services.GetService<IActiveStatementTrackingService>(); 26var trackingService = workspace.Services.GetService<IActiveStatementTrackingService>();
EncapsulateField\AbstractEncapsulateFieldCommandHandler.cs (1)
109var previewService = workspace.Services.GetService<IPreviewDialogService>();
ExtractInterface\AbstractExtractInterfaceCommandHandler.cs (2)
71(errorMessage, severity) => workspace.Services.GetService<INotificationService>().SendNotification(errorMessage, severity: severity), 85var navigationService = workspace.Services.GetService<IDocumentNavigationService>();
InlineRename\CommandHandlers\AbstractRenameCommandHandler_RenameHandler.cs (1)
142var notificationService = workspace.Services.GetService<INotificationService>();
InlineRename\InlineRenameSession.cs (1)
188this.UndoManager = workspace.Services.GetService<IInlineRenameUndoManager>();
InlineRename\UndoManagerServiceFactory.cs (1)
43var textUndoHistoryService = workspace.Services.GetService<ITextUndoHistoryWorkspaceService>();
RenameTracking\RenameTrackingTaggerProvider.RenameTrackingCodeAction.cs (1)
128var notificationService = workspace.Services.GetService<INotificationService>();
Shared\Extensions\ITextBufferExtensions.cs (1)
59service = workspace.Services.GetService<ITextBufferSupportsFeatureService>();
Undo\Extensions.cs (1)
19var undoService = workspace.Services.GetService<IGlobalUndoService>();
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (2)
Formatting\CoreFormatterTestsBase.cs (2)
97if (workspace.Services.GetService<IHostDependentFormattingRuleFactoryService>() is TestFormattingRuleFactoryServiceFactory.Factory factory && factory.BaseIndentation != 0 && factory.TextSpan.Contains(p.Position)) 192var formattingRuleProvider = workspace.Services.GetService<IHostDependentFormattingRuleFactoryService>();
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (1)
Diagnostics\DiagnosticAnalyzerServiceTests.cs (1)
523var documentTrackingService = (TestDocumentTrackingService)workspace.Services.GetService<IDocumentTrackingService>();
Microsoft.CodeAnalysis.EditorFeatures.Wpf (7)
Suggestions\FixAll\FixMultipleOccurrencesService.cs (1)
81var extensionManager = workspace.Services.GetService<IExtensionManager>();
Suggestions\PreviewChanges\PreviewChangesCodeAction.cs (1)
37var previewDialogService = _workspace.Services.GetService<IPreviewDialogService>();
Suggestions\SuggestedActions\SuggestedAction.cs (2)
142await Workspace.Services.GetService<IExtensionManager>().PerformActionAsync( 218var extensionManager = Workspace.Services.GetService<IExtensionManager>();
Suggestions\SuggestedActionWithNestedFlavors.cs (3)
75var extensionManager = this.Workspace.Services.GetService<IExtensionManager>(); 150var previewPaneService = Workspace.Services.GetService<IPreviewPaneService>(); 161var extensionManager = this.Workspace.Services.GetService<IExtensionManager>();
Microsoft.CodeAnalysis.ExternalAccess.FSharp (4)
Navigation\FSharpDocumentNavigationService.cs (4)
25var service = workspace.Services.GetService<IDocumentNavigationService>(); 32var service = workspace.Services.GetService<IDocumentNavigationService>(); 39var service = workspace.Services.GetService<IDocumentNavigationService>(); 47var service = workspace.Services.GetService<IDocumentNavigationService>();
Microsoft.CodeAnalysis.Features (3)
Completion\Providers\ImportCompletionProvider\AbstractImportCompletionCacheServiceFactory.cs (1)
43var cacheService = workspaceServices.GetService<IWorkspaceCacheService>();
ExternalAccess\UnitTesting\SolutionCrawler\UnitTestingSolutionCrawlerService.cs (1)
42if (workspace.Services.GetService<IUnitTestingSolutionCrawlerRegistrationService>() is UnitTestingSolutionCrawlerRegistrationService registration)
GenerateOverrides\GenerateOverridesWithDialogCodeAction.cs (1)
104var service = workspace.Services.GetService<ILegacyGlobalOptionsWorkspaceService>();
Microsoft.CodeAnalysis.Features.UnitTests (1)
EditAndContinue\RemoteEditAndContinueServiceTests.cs (1)
55var clientProvider = (InProcRemoteHostClientProvider?)localWorkspace.Services.GetService<IRemoteHostClientProvider>();
Microsoft.CodeAnalysis.Remote.ServiceHub (1)
Services\DiagnosticAnalyzer\RemoteDiagnosticAnalyzerService.cs (1)
116var service = GetWorkspace().Services.GetService<IPerformanceTrackerService>();
Microsoft.CodeAnalysis.Workspaces (8)
Remote\RemoteHostClient.cs (1)
24var service = workspace.Services.GetService<IRemoteHostClientProvider>();
Shared\TestHooks\AsynchronousOperationListenerProvider.cs (1)
121if (workspace?.Services.GetService<IRemoteHostClientProvider>() is { } remoteHostClientProvider)
Workspace\Host\HostWorkspaceServices.cs (1)
85var service = GetService<TWorkspaceService>();
Workspace\Host\Metadata\MetadataServiceFactory.cs (1)
23=> new DefaultMetadataService(workspaceServices.GetService<IDocumentationProviderService>());
Workspace\Host\SolutionServices.cs (2)
35/// <inheritdoc cref="HostWorkspaceServices.GetService"/> 37=> _services.GetService<TWorkspaceService>();
Workspace\Workspace.cs (1)
687this.Services.GetService<IWorkspaceEventListenerService>()?.Stop();
Workspace\Workspace_Events.cs (1)
255this.Services.GetService<IWorkspaceEventListenerService>()?.EnsureListeners();
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
Workspaces\TestWorkspace_XmlConsumption.cs (1)
514var metadataService = Services.GetService<IMetadataService>();
Workspaces\TestWorkspace`1.cs (1)
98if (Services.GetService<INotificationService>() is INotificationServiceCallback callback)
Microsoft.CodeAnalysis.Workspaces.UnitTests (11)
UtilityTest\SourceTextSerializationTests.cs (1)
25var textService = Assert.IsType<TextFactoryService>(workspace.Services.GetService<ITextFactoryService>());
WorkspaceServiceTests\TemporaryStorageServiceTests.cs (9)
34var textFactory = Assert.IsType<TextFactoryService>(workspace.Services.GetService<ITextFactoryService>()); 54var textFactory = Assert.IsType<TextFactoryService>(workspace.Services.GetService<ITextFactoryService>()); 91var textFactory = Assert.IsType<TextFactoryService>(workspace.Services.GetService<ITextFactoryService>()); 109var textFactory = Assert.IsType<TextFactoryService>(workspace.Services.GetService<ITextFactoryService>()); 151var textFactory = Assert.IsType<TextFactoryService>(workspace.Services.GetService<ITextFactoryService>()); 181var textFactory = Assert.IsType<TextFactoryService>(workspace.Services.GetService<ITextFactoryService>()); 206var textFactory = Assert.IsType<TextFactoryService>(workspace.Services.GetService<ITextFactoryService>()); 241var textFactory = Assert.IsType<TextFactoryService>(workspace.Services.GetService<ITextFactoryService>()); 276var textFactory = Assert.IsType<TextFactoryService>(workspace.Services.GetService<ITextFactoryService>());
WorkspaceTests\AdhocWorkspaceTests.cs (1)
574var service = ws.Services.GetService<IDocumentTextDifferencingService>();
Microsoft.VisualStudio.LanguageServices (14)
CallHierarchy\CallHierarchyDetail.cs (1)
75var navigator = _workspace.Services.GetService<IDocumentNavigationService>();
CodeCleanup\AbstractCodeCleanUpFixer.cs (1)
186var workspaceStatusService = workspace.Services.GetService<IWorkspaceStatusService>();
Diagnostics\VisualStudioDiagnosticAnalyzerProvider.WorkspaceEventListener.cs (1)
44var setter = workspace.Services.GetService<ISolutionAnalyzerSetterWorkspaceService>();
Implementation\VirtualMemoryNotificationListener.cs (1)
49_workspaceCacheService = workspace.Services.GetService<IWorkspaceCacheService>() as WorkspaceCacheService;
InlineRename\InlineRenameUndoManager.cs (1)
105var textUndoHistoryService = workspace.Services.GetService<ITextUndoHistoryWorkspaceService>();
LanguageService\AbstractLanguageService`2.IVsLanguageTextOps.cs (1)
68var ruleFactory = Workspace.Services.GetService<IHostDependentFormattingRuleFactoryService>();
LanguageService\AbstractPackage`2.cs (2)
97_packageInstallerService = workspace.Services.GetService<IPackageInstallerService>() as PackageInstallerService; 98_symbolSearchService = workspace.Services.GetService<ISymbolSearchService>() as VisualStudioSymbolSearchService;
Packaging\PackageInstallerServiceFactory.cs (2)
353var notificationService = Workspace.Services.GetService<INotificationService>(); 414var notificationService = Workspace.Services.GetService<INotificationService>();
ProjectSystem\MiscellaneousFilesWorkspace.cs (1)
133var manager = this.Services.GetService<VisualStudioMetadataReferenceManager>();
StackTraceExplorer\StackFrameViewModel.cs (1)
130var navigationService = _workspace.Services.GetService<IDocumentNavigationService>();
ValueTracking\ValueTrackedTreeItemViewModel.cs (1)
180var navigationService = Workspace.Services.GetService<IDocumentNavigationService>();
Workspace\SourceGeneratedFileManager.cs (1)
271_workspaceConfigurationService = this.Workspace.Services.GetService<IWorkspaceConfigurationService>();
Microsoft.VisualStudio.LanguageServices.CSharp (1)
Options\NamingStylesOptionPage.cs (1)
28_notificationService = workspace.Services.GetService<INotificationService>();
Microsoft.VisualStudio.LanguageServices.Test.Utilities2 (1)
CallHierarchy\CallHierarchyTestState.vb (1)
94Dim notificationService = DirectCast(workspace.Services.GetService(Of INotificationService)(), INotificationServiceCallback)
Microsoft.VisualStudio.LanguageServices.VisualBasic (2)
Options\NamingStylesOptionPage.vb (1)
24_notificationService = workspace.Services.GetService(Of INotificationService)
ProjectSystemShim\TempPECompiler.vb (1)
28Dim metadataService = _workspace.Services.GetService(Of IMetadataService)
Roslyn.VisualStudio.Next.UnitTests (16)
Services\AssetProviderTests.cs (4)
54var assetSource = new SimpleAssetSource(workspace.Services.GetService<ISerializerService>(), new Dictionary<Checksum, object>() { { checksum, data } }); 85var assetSource = new SimpleAssetSource(workspace.Services.GetService<ISerializerService>(), map); 113var assetSource = new SimpleAssetSource(workspace.Services.GetService<ISerializerService>(), map); 138var assetSource = new SimpleAssetSource(workspace.Services.GetService<ISerializerService>(), map);
Services\ServiceHubServicesTests.cs (1)
116var assetSource = new SimpleAssetSource(workspace.Services.GetService<ISerializerService>(), map);
Services\SolutionServiceTests.cs (10)
557Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())), new SolutionAssetCache(), new SimpleAssetSource(workspace.Services.GetService<ISerializerService>(), map), remoteWorkspace.Services.SolutionServices); 598Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())), new SolutionAssetCache(), new SimpleAssetSource(workspace.Services.GetService<ISerializerService>(), map), remoteWorkspace.Services.SolutionServices); 640Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())), new SolutionAssetCache(), new SimpleAssetSource(workspace.Services.GetService<ISerializerService>(), map), remoteWorkspace.Services.SolutionServices); 673Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())), new SolutionAssetCache(), new SimpleAssetSource(workspace.Services.GetService<ISerializerService>(), map), remoteWorkspace.Services.SolutionServices); 715Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())), new SolutionAssetCache(), new SimpleAssetSource(workspace.Services.GetService<ISerializerService>(), map), remoteWorkspace.Services.SolutionServices); 755Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())), new SolutionAssetCache(), new SimpleAssetSource(workspace.Services.GetService<ISerializerService>(), map), remoteWorkspace.Services.SolutionServices); 793Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())), new SolutionAssetCache(), new SimpleAssetSource(workspace.Services.GetService<ISerializerService>(), map), remoteWorkspace.Services.SolutionServices); 826Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())), new SolutionAssetCache(), new SimpleAssetSource(workspace.Services.GetService<ISerializerService>(), map), remoteWorkspace.Services.SolutionServices); 881Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())), new SolutionAssetCache(), new SimpleAssetSource(workspace.Services.GetService<ISerializerService>(), map), remoteWorkspace.Services.SolutionServices); 950Checksum.Create(ImmutableArray.CreateRange(Guid.NewGuid().ToByteArray())), new SolutionAssetCache(), new SimpleAssetSource(workspace.Services.GetService<ISerializerService>(), map), remoteWorkspace.Services.SolutionServices);
Services\VisualStudioDiagnosticAnalyzerExecutorTests.cs (1)
192var remotableDataService = workspace.Services.GetService<ISolutionAssetStorageProvider>();