174 references to GetService
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (41)
BlockCommentEditing\CloseBlockCommentTests.cs (1)
285var globalOptions = workspace.GetService<IGlobalOptionService>();
Classification\SemanticClassifierTests.cs (2)
3931workspace.GetService<TaggerHost>(), 3932workspace.GetService<ClassificationTypeMap>());
Classification\SyntacticTaggerTests.cs (2)
46workspace.GetService<TaggerHost>(), 100workspace.GetService<TaggerHost>(),
Classification\TotalClassifierTests.cs (4)
3061workspace.GetService<TaggerHost>(), 3062workspace.GetService<ClassificationTypeMap>()); 3163workspace.GetService<IThreadingContext>(), 3164workspace.GetService<ClassificationTypeMap>(),
CommentSelection\CSharpCommentSelectionTests.cs (3)
135workspace.GetService<ITextUndoHistoryRegistry>(), 136workspace.GetService<IEditorOperationsFactoryService>(), 137workspace.GetService<EditorOptionsService>());
CompleteStatement\CSharpCompleteStatementCommandHandlerTests.cs (1)
5105var globalOptions = workspace.GetService<IGlobalOptionService>();
FixInterpolatedVerbatimString\FixInterpolatedVerbatimStringCommandHandlerTests.cs (3)
45var editorOperations = workspace.GetService<IEditorOperationsFactoryService>().GetEditorOperations(view); 69var history = workspace.GetService<ITextUndoHistoryRegistry>().GetHistory(view.TextBuffer); 90var history = workspace.GetService<ITextUndoHistoryRegistry>().GetHistory(view.TextBuffer);
Formatting\FormattingEngineTests.cs (1)
2948var commandHandler = workspace.GetService<FormatCommandHandler>();
Formatting\Indentation\SmartIndenterTests.cs (1)
3469var editorOptionsService = workspace.GetService<EditorOptionsService>();
Formatting\Indentation\SmartTokenFormatterFormatRangeTests.cs (2)
3382var optionsService = workspace.GetService<EditorOptionsService>(); 3386var commandHandler = workspace.GetService<FormatCommandHandler>();
Interactive\BraceMatching\InteractiveBraceHighlightingTests.cs (2)
36workspace.GetService<TaggerHost>(), 37workspace.GetService<IBraceMatchingService>());
Organizing\OrganizeTypeDeclarationTests.cs (1)
1185workspace.GetService<IThreadingContext>(),
PdbSourceDocument\AbstractPdbSourceDocumentTests.cs (1)
129var service = workspace.GetService<IMetadataAsSourceFileService>();
PdbSourceDocument\ImplementationAssemblyLookupServiceTests.cs (10)
55var service = workspace.GetService<IImplementationAssemblyLookupService>(); 94var service = workspace.GetService<IImplementationAssemblyLookupService>(); 136var service = workspace.GetService<IImplementationAssemblyLookupService>(); 188var service = workspace.GetService<IImplementationAssemblyLookupService>(); 248var service = workspace.GetService<IImplementationAssemblyLookupService>(); 309var service = workspace.GetService<IImplementationAssemblyLookupService>(); 364var service = workspace.GetService<IImplementationAssemblyLookupService>(); 415var service = workspace.GetService<IImplementationAssemblyLookupService>(); 480var service = workspace.GetService<IImplementationAssemblyLookupService>(); 551var service = workspace.GetService<IImplementationAssemblyLookupService>();
PdbSourceDocument\PdbSourceDocumentTests.cs (5)
881var service = workspace.GetService<IMetadataAsSourceFileService>(); 970var service = workspace.GetService<IMetadataAsSourceFileService>(); 995var service = workspace.GetService<IMetadataAsSourceFileService>(); 1021var service = workspace.GetService<IMetadataAsSourceFileService>(); 1046var service = workspace.GetService<IMetadataAsSourceFileService>();
SplitStringLiteral\SplitStringLiteralCommandHandlerTests.cs (2)
59var editorOptionsFactory = workspace.GetService<IEditorOptionsFactoryService>(); 87var undoHistoryRegistry = workspace.GetService<ITextUndoHistoryRegistry>();
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (27)
AbstractCommandHandlerTestState.cs (1)
135=> Workspace.GetService<T>();
AutomaticCompletion\AbstractAutomaticBraceCompletionTests.cs (1)
151var provider = Assert.IsType<BraceCompletionSessionProvider>(workspace.GetService<IBraceCompletionSessionProvider>());
AutomaticCompletion\AbstractAutomaticLineEnderTests.cs (1)
115=> workspace.GetService<T>();
BraceHighlighting\AbstractBraceHighlightingTests.cs (2)
40workspace.GetService<TaggerHost>(), 58=> workspace.GetService<IBraceMatchingService>();
BraceMatching\AbstractBraceMatcherTests.cs (1)
28var braceMatcher = workspace.GetService<IBraceMatchingService>();
Diagnostics\DiagnosticTaggerWrapper.cs (2)
37_threadingContext = workspace.GetService<IThreadingContext>(); 38_listenerProvider = workspace.GetService<IAsynchronousOperationListenerProvider>();
DocumentationComments\AbstractDocumentationCommentTests.cs (2)
142var optionsFactory = workspace.GetService<IEditorOptionsFactoryService>(); 161workspace.GetService<IEditorOperationsFactoryService>());
Formatting\CoreFormatterTestsBase.cs (5)
78var editorOptionsFactory = workspace.GetService<IEditorOptionsFactoryService>(); 117workspace.GetService<EditorOptionsService>()); 144var commandHandler = workspace.GetService<FormatCommandHandler>(); 253var commandHandler = workspace.GetService<FormatCommandHandler>(); 260var commandHandler = workspace.GetService<FormatCommandHandler>();
LanguageServer\AbstractLanguageServerProtocolTests.cs (6)
390options?.OptionUpdater?.Invoke(workspace.GetService<IGlobalOptionService>()); 392workspace.GetService<LspWorkspaceRegistrationService>().Register(workspace); 577TestWorkspace.GetService<LspWorkspaceRegistrationService>().Register(GetManagerAccessor().GetLspMiscellaneousFilesWorkspace()); 776var listenerProvider = TestWorkspace.GetService<IAsynchronousOperationListenerProvider>(); 800TestWorkspace.GetService<LspWorkspaceRegistrationService>().Deregister(TestWorkspace); 801TestWorkspace.GetService<LspWorkspaceRegistrationService>().Deregister(GetManagerAccessor().GetLspMiscellaneousFilesWorkspace());
NavigateTo\AbstractNavigateToTests.cs (4)
83workspace.GetService<IThreadingContext>(), 84workspace.GetService<IUIThreadOperationExecutor>(), 157workspace.GetService<IThreadingContext>(), 158workspace.GetService<IUIThreadOperationExecutor>(),
Workspaces\EditorTestHostDocument.cs (1)
169var threadingContext = workspace.GetService<IThreadingContext>();
Workspaces\EditorTestWorkspace.cs (1)
256var projectionBufferFactory = this.GetService<IProjectionBufferFactoryService>();
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (36)
CodeFixes\CodeFixServiceTests.cs (3)
46var diagnosticService = Assert.IsType<DiagnosticAnalyzerService>(workspace.GetService<IDiagnosticAnalyzerService>()); 358var diagnosticService = Assert.IsType<DiagnosticAnalyzerService>(workspace.GetService<IDiagnosticAnalyzerService>()); 769var diagnosticService = Assert.IsType<DiagnosticAnalyzerService>(workspace.GetService<IDiagnosticAnalyzerService>());
CodeRefactorings\CodeRefactoringServiceTest.cs (5)
45var refactoringService = workspace.GetService<ICodeRefactoringService>(); 85var refactoringService = workspace.GetService<ICodeRefactoringService>(); 103var refactoringService = workspace.GetService<ICodeRefactoringService>(); 158var refactoringService = workspace.GetService<ICodeRefactoringService>(); 197var refactoringService = workspace.GetService<ICodeRefactoringService>();
Diagnostics\DiagnosticAnalyzerServiceTests.cs (5)
514var service = Assert.IsType<DiagnosticAnalyzerService>(workspace.GetService<IDiagnosticAnalyzerService>()); 515var globalOptions = workspace.GetService<IGlobalOptionService>(); 633var service = Assert.IsType<DiagnosticAnalyzerService>(workspace.GetService<IDiagnosticAnalyzerService>()); 856var globalOptions = workspace.GetService<IGlobalOptionService>(); 873var service = Assert.IsType<DiagnosticAnalyzerService>(workspace.GetService<IDiagnosticAnalyzerService>());
EditAndContinue\EditAndContinueLanguageServiceTests.cs (13)
58var listenerProvider = workspace.GetService<MockWorkspaceEventListenerProvider>(); 61((MockServiceBroker)workspace.GetService<IServiceBrokerProvider>().ServiceBroker).CreateService = t => t switch 67((MockHostWorkspaceProvider)workspace.GetService<IHostWorkspaceProvider>()).Workspace = workspace; 71languageService = workspace.GetService<EditAndContinueLanguageService>(); 100var globalOptions = localWorkspace.GetService<IGlobalOptionService>(); 101((MockHostWorkspaceProvider)localWorkspace.GetService<IHostWorkspaceProvider>()).Workspace = localWorkspace; 103((MockServiceBroker)localWorkspace.GetService<IServiceBrokerProvider>().ServiceBroker).CreateService = t => t switch 111mockEncService = (MockEditAndContinueService)localWorkspace.GetService<IEditAndContinueService>(); 113var localService = localWorkspace.GetService<EditAndContinueLanguageService>(); 126var sessionState = localWorkspace.GetService<IEditAndContinueSessionTracker>(); 127var diagnosticRefresher = localWorkspace.GetService<IDiagnosticsRefresher>(); 241var sourceTextProvider = workspace.GetService<PdbMatchingSourceTextProvider>(); 273await workspace.GetService<AsynchronousOperationListenerProvider>().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync();
MetadataAsSource\AbstractMetadataAsSourceTests.TestContext.cs (1)
72_metadataAsSourceService = Workspace.GetService<IMetadataAsSourceFileService>();
RenameTracking\RenameTrackingTestState.cs (6)
85EditorOperations = Workspace.GetService<IEditorOperationsFactoryService>().GetEditorOperations(_view); 99Workspace.GetService<IThreadingContext>(), 100Workspace.GetService<IInlineRenameService>(), 101Workspace.GetService<IDiagnosticAnalyzerService>(), 102Workspace.GetService<IGlobalOptionService>(), 103Workspace.GetService<IAsynchronousOperationListenerProvider>());
Tagging\AsynchronousTaggerTests.cs (3)
70workspace.GetService<TaggerHost>(), 162workspace.GetService<TaggerHost>(), 218workspace.GetService<TaggerHost>(),
Microsoft.CodeAnalysis.Features.Test.Utilities (1)
EditAndContinue\EditAndContinueWorkspaceTestBase.cs (1)
149var service = (EditAndContinueService)workspace.GetService<IEditAndContinueService>();
Microsoft.CodeAnalysis.Features.UnitTests (2)
EditAndContinue\RemoteEditAndContinueServiceTests.cs (2)
52var globalOptions = localWorkspace.GetService<IGlobalOptionService>(); 60mockEncService = (MockEditAndContinueService)localWorkspace.GetService<IEditAndContinueService>();
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (5)
Configuration\DidChangeConfigurationNotificationHandlerTest.cs (1)
158var globalOptionService = workspace.GetService<IGlobalOptionService>();
Options\SolutionAnalyzerConfigOptionsUpdaterTests.cs (4)
30var listenerProvider = workspace.GetService<MockWorkspaceEventListenerProvider>(); 41var globalOptions = workspace.GetService<IGlobalOptionService>(); 141var globalOptions = workspace.GetService<IGlobalOptionService>(); 257var globalOptions = workspace.GetService<IGlobalOptionService>();
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
Workspaces\TestWorkspace`1.cs (2)
80var workspaceConfigurationService = GetService<TestWorkspaceConfigurationService>(); 96this.GlobalOptions = GetService<IGlobalOptionService>();
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (3)
DocumentOutline\DocumentOutlineTestsBase.cs (1)
80var threadingContext = workspace.GetService<IThreadingContext>();
Interactive\Commands\ResetInteractiveTests.cs (2)
82var uiThreadOperationExecutor = workspace.GetService<IUIThreadOperationExecutor>(); 83var editorOptionsService = workspace.GetService<EditorOptionsService>();
Microsoft.VisualStudio.LanguageServices.Test.Utilities2 (3)
CallHierarchy\CallHierarchyTestState.vb (3)
92Dim provider = workspace.GetService(Of CallHierarchyProvider)() 99Dim threadOperationExecutor = workspace.GetService(Of IUIThreadOperationExecutor) 100Dim asynchronousOperationListenerProvider = workspace.GetService(Of IAsynchronousOperationListenerProvider)()
Microsoft.VisualStudio.LanguageServices.UnitTests (54)
CommonControls\MemberSelectionViewModelTests.vb (1)
190workspace.GetService(Of IUIThreadOperationExecutor),
Diagnostics\ExternalDiagnosticUpdateSourceTests.vb (9)
45Dim waiter = workspace.GetService(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.ErrorList) 73Dim waiter = workspace.GetService(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.ErrorList) 91Dim waiter = workspace.GetService(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.ErrorList) 117Dim waiter = workspace.GetService(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.ErrorList) 153Dim waiter = workspace.GetService(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.ErrorList) 192Dim globalOptions = workspace.GetService(Of IGlobalOptionService) 193Dim waiter = workspace.GetService(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.ErrorList) 224Dim globalOptions = workspace.GetService(Of IGlobalOptionService) 236Dim service = Assert.IsType(Of DiagnosticAnalyzerService)(workspace.GetService(Of IDiagnosticAnalyzerService)())
MoveStaticMembers\MoveStaticMembersViewModelTest.vb (1)
43workspace.GetService(Of IUIThreadOperationExecutor))
Options\BasicEditorConfigGeneratorTests.vb (2)
164Dim editorConfigOptions = workspace.GetService(Of EditorConfigOptionsEnumerator).GetOptions(LanguageNames.VisualBasic) 315Dim editorConfigOptions = workspace.GetService(Of EditorConfigOptionsEnumerator).GetOptions(LanguageNames.VisualBasic)
Options\CSharpEditorConfigGeneratorTests.vb (2)
268Dim groupedOptions = workspace.GetService(Of EditorConfigOptionsEnumerator).GetOptions(LanguageNames.CSharp) 526Dim groupedOptions = workspace.GetService(Of EditorConfigOptionsEnumerator).GetOptions(LanguageNames.CSharp)
ProjectSystemShim\FileChangeWatcherTests.vb (2)
34Dim fileChangeWatcher = New FileChangeWatcher(workspace.GetService(Of IAsynchronousOperationListenerProvider)(), Task.FromResult(Of IVsAsyncFileChangeEx2)(fileChangeService)) 48Await workspace.GetService(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync()
ProjectSystemShim\VisualStudioRuleSetTests.vb (17)
51Dim fileChangeWatcher = New FileChangeWatcher(workspace.GetService(Of IAsynchronousOperationListenerProvider)(), Task.FromResult(Of IVsAsyncFileChangeEx2)(fileChangeService)) 58Await workspace.GetService(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync() 62Await workspace.GetService(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync() 95Dim fileChangeWatcher = New FileChangeWatcher(workspace.GetService(Of IAsynchronousOperationListenerProvider)(), Task.FromResult(Of IVsAsyncFileChangeEx2)(fileChangeService)) 102Await workspace.GetService(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync() 106Await workspace.GetService(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync() 139Dim fileChangeWatcher = New FileChangeWatcher(workspace.GetService(Of IAsynchronousOperationListenerProvider)(), Task.FromResult(Of IVsAsyncFileChangeEx2)(fileChangeService)) 152Await workspace.GetService(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync() 180Dim fileChangeWatcher = New FileChangeWatcher(workspace.GetService(Of IAsynchronousOperationListenerProvider)(), Task.FromResult(Of IVsAsyncFileChangeEx2)(fileChangeService)) 190Await workspace.GetService(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync() 200Await workspace.GetService(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync() 206Await workspace.GetService(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync() 229Dim fileChangeWatcher = New FileChangeWatcher(workspace.GetService(Of IAsynchronousOperationListenerProvider)(), Task.FromResult(Of IVsAsyncFileChangeEx2)(fileChangeService)) 238Await workspace.GetService(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync() 244Await workspace.GetService(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync() 267Dim fileChangeWatcher = New FileChangeWatcher(workspace.GetService(Of IAsynchronousOperationListenerProvider)(), Task.FromResult(Of IVsAsyncFileChangeEx2)(fileChangeService)) 272Await workspace.GetService(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync()
PullMemberUp\PullMemberUpViewModelTest.vb (1)
263workspace.GetService(Of IUIThreadOperationExecutor),
Snippets\CSharpSnippetExpansionClientTests.vb (1)
311Dim editorOptionsService = workspace.GetService(Of EditorOptionsService)()
Snippets\VisualBasicSnippetExpansionClientTests.vb (1)
352Dim optionsService = workspace.GetService(Of EditorOptionsService)()
SolutionExplorer\AnalyzerItemsSourceTests.vb (2)
28Dim analyzerFolder = New AnalyzersFolderItem(workspace.GetService(Of IThreadingContext), workspace, project.Id, Nothing, Nothing) 29Dim listenerProvider = workspace.GetService(Of IAsynchronousOperationListenerProvider)
SolutionExplorer\AnalyzerItemTests.vb (2)
27Dim analyzerFolder = New AnalyzersFolderItem(workspace.GetService(Of IThreadingContext), workspace, project.Id, Nothing, Nothing) 46Dim analyzerFolder = New AnalyzersFolderItem(workspace.GetService(Of IThreadingContext), workspace, project.Id, Nothing, Nothing)
SolutionExplorer\AnalyzersFolderItemTests.vb (2)
26Dim analyzerFolder = New AnalyzersFolderItem(workspace.GetService(Of IThreadingContext), workspace, project.Id, Nothing, Nothing) 44Dim analyzerFolder = New AnalyzersFolderItem(workspace.GetService(Of IThreadingContext), workspace, project.Id, Nothing, Nothing)
SolutionExplorer\CpsDiagnosticItemSourceTests.vb (3)
41Dim listenerProvider = workspace.GetService(Of IAsynchronousOperationListenerProvider) 43workspace.GetService(Of IThreadingContext), 48New FakeAnalyzersCommandHandler, workspace.GetService(Of IDiagnosticAnalyzerService),
SolutionExplorer\SourceGeneratorItemTests.vb (7)
272workspace.GetService(Of IThreadingContext), 273New AnalyzerItem(New AnalyzersFolderItem(workspace.GetService(Of IThreadingContext), workspace, projectId, Nothing, Nothing), analyzerReference, Nothing), 275workspace.GetService(Of IDiagnosticAnalyzerService), 276workspace.GetService(Of IAsynchronousOperationListenerProvider)) 280Dim asyncListener = workspace.GetService(Of IAsynchronousOperationListenerProvider).GetListener(FeatureAttribute.SourceGenerators) 282Return New SourceGeneratedFileItemSource(generatorItem, workspace.GetService(Of IThreadingContext), workspace, asyncListener) 286Dim service = workspace.GetService(Of AsynchronousOperationListenerProvider)
Venus\DocumentService_IntegrationTests.vb (1)
232Dim diagnosticService = Assert.IsType(Of DiagnosticAnalyzerService)(workspace.GetService(Of IDiagnosticAnalyzerService)())