157 references to GetService
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (41)
BlockCommentEditing\CloseBlockCommentTests.cs (1)
285var globalOptions = workspace.GetService<IGlobalOptionService>();
Classification\SemanticClassifierTests.cs (2)
3924workspace.GetService<TaggerHost>(), 3925workspace.GetService<ClassificationTypeMap>());
Classification\SyntacticTaggerTests.cs (2)
46workspace.GetService<TaggerHost>(), 100workspace.GetService<TaggerHost>(),
Classification\TotalClassifierTests.cs (4)
3063workspace.GetService<TaggerHost>(), 3064workspace.GetService<ClassificationTypeMap>()); 3165workspace.GetService<IThreadingContext>(), 3166workspace.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)
3136var commandHandler = workspace.GetService<FormatCommandHandler>();
Formatting\Indentation\SmartIndenterTests.cs (1)
3551var 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)
128var 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 (20)
AbstractCommandHandlerTestState.cs (1)
135=> Workspace.GetService<T>();
AutomaticCompletion\AbstractAutomaticBraceCompletionTests.cs (1)
152var 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 (1)
34_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>();
NavigateTo\AbstractNavigateToTests.cs (4)
82workspace.GetService<IThreadingContext>(), 83workspace.GetService<IUIThreadOperationExecutor>(), 156workspace.GetService<IThreadingContext>(), 157workspace.GetService<IUIThreadOperationExecutor>(),
Workspaces\EditorTestHostDocument.cs (1)
169var threadingContext = workspace.GetService<IThreadingContext>();
Workspaces\EditorTestWorkspace.cs (1)
281var projectionBufferFactory = this.GetService<IProjectionBufferFactoryService>();
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (30)
CodeRefactorings\CodeRefactoringServiceTest.cs (6)
46var refactoringService = workspace.GetService<ICodeRefactoringService>(); 86var refactoringService = workspace.GetService<ICodeRefactoringService>(); 104var refactoringService = workspace.GetService<ICodeRefactoringService>(); 159var refactoringService = workspace.GetService<ICodeRefactoringService>(); 198var refactoringService = workspace.GetService<ICodeRefactoringService>(); 243var refactoringService = (CodeRefactorings.CodeRefactoringService)workspace.GetService<ICodeRefactoringService>();
Diagnostics\DiagnosticAnalyzerServiceTests.cs (2)
453var globalOptions = workspace.GetService<IGlobalOptionService>(); 791var globalOptions = workspace.GetService<IGlobalOptionService>();
EditAndContinue\EditAndContinueLanguageServiceTests.cs (13)
60var listenerProvider = workspace.GetService<MockWorkspaceEventListenerProvider>(); 63((MockServiceBroker)workspace.GetService<IServiceBrokerProvider>().ServiceBroker).CreateService = t => t switch 69((MockHostWorkspaceProvider)workspace.GetService<IHostWorkspaceProvider>()).Workspace = workspace; 73languageService = workspace.GetService<EditAndContinueLanguageService>(); 104var globalOptions = localWorkspace.GetService<IGlobalOptionService>(); 105((MockHostWorkspaceProvider)localWorkspace.GetService<IHostWorkspaceProvider>()).Workspace = localWorkspace; 107((MockServiceBroker)localWorkspace.GetService<IServiceBrokerProvider>().ServiceBroker).CreateService = t => t switch 115mockEncService = (MockEditAndContinueService)localWorkspace.GetService<IEditAndContinueService>(); 117var localService = localWorkspace.GetService<EditAndContinueLanguageService>(); 128var sessionState = localWorkspace.GetService<IEditAndContinueSessionTracker>(); 129var diagnosticRefresher = localWorkspace.GetService<IDiagnosticsRefresher>(); 289var sourceTextProvider = workspace.GetService<PdbMatchingSourceTextProvider>(); 323await workspace.GetService<AsynchronousOperationListenerProvider>().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync();
MetadataAsSource\AbstractMetadataAsSourceTests.TestContext.cs (1)
72_metadataAsSourceService = Workspace.GetService<IMetadataAsSourceFileService>();
RenameTracking\RenameTrackingTestState.cs (5)
85EditorOperations = Workspace.GetService<IEditorOperationsFactoryService>().GetEditorOperations(_view); 99Workspace.GetService<IThreadingContext>(), 100Workspace.GetService<IInlineRenameService>(), 101Workspace.GetService<IGlobalOptionService>(), 102Workspace.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)
159var 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)
162var globalOptionService = workspace.GetService<IGlobalOptionService>();
Options\SolutionAnalyzerConfigOptionsUpdaterTests.cs (4)
30var listenerProvider = workspace.GetService<MockWorkspaceEventListenerProvider>(); 41var globalOptions = workspace.GetService<IGlobalOptionService>(); 111var globalOptions = workspace.GetService<IGlobalOptionService>(); 272var globalOptions = workspace.GetService<IGlobalOptionService>();
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
Workspaces\TestWorkspace`1.cs (2)
74var workspaceConfigurationService = GetService<TestWorkspaceConfigurationService>(); 89this.GlobalOptions = GetService<IGlobalOptionService>();
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (3)
DocumentOutline\DocumentOutlineTestsBase.cs (1)
79var 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)
93Dim provider = workspace.GetService(Of CallHierarchyProvider)() 100Dim threadOperationExecutor = workspace.GetService(Of IUIThreadOperationExecutor) 101Dim asynchronousOperationListenerProvider = workspace.GetService(Of IAsynchronousOperationListenerProvider)()
Microsoft.VisualStudio.LanguageServices.UnitTests (50)
CommonControls\MemberSelectionViewModelTests.vb (1)
190workspace.GetService(Of IUIThreadOperationExecutor),
Diagnostics\ExternalDiagnosticUpdateSourceTests.vb (8)
46Dim waiter = workspace.GetService(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.ErrorList) 74Dim waiter = workspace.GetService(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.ErrorList) 92Dim waiter = workspace.GetService(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.ErrorList) 118Dim waiter = workspace.GetService(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.ErrorList) 154Dim waiter = workspace.GetService(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.ErrorList) 193Dim globalOptions = workspace.GetService(Of IGlobalOptionService) 194Dim waiter = workspace.GetService(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.ErrorList) 225Dim globalOptions = workspace.GetService(Of IGlobalOptionService)
MoveStaticMembers\MoveStaticMembersViewModelTest.vb (1)
45workspace.GetService(Of IUIThreadOperationExecutor))
Options\BasicEditorConfigGeneratorTests.vb (2)
165Dim editorConfigOptions = workspace.GetService(Of EditorConfigOptionsEnumerator).GetOptions(LanguageNames.VisualBasic) 316Dim editorConfigOptions = workspace.GetService(Of EditorConfigOptionsEnumerator).GetOptions(LanguageNames.VisualBasic)
Options\CSharpEditorConfigGeneratorTests.vb (2)
270Dim groupedOptions = workspace.GetService(Of EditorConfigOptionsEnumerator).GetOptions(LanguageNames.CSharp) 529Dim 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)
52Dim fileChangeWatcher = New FileChangeWatcher(workspace.GetService(Of IAsynchronousOperationListenerProvider)(), Task.FromResult(Of IVsAsyncFileChangeEx2)(fileChangeService)) 59Await workspace.GetService(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync() 63Await workspace.GetService(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync() 96Dim fileChangeWatcher = New FileChangeWatcher(workspace.GetService(Of IAsynchronousOperationListenerProvider)(), Task.FromResult(Of IVsAsyncFileChangeEx2)(fileChangeService)) 103Await workspace.GetService(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync() 107Await workspace.GetService(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync() 140Dim fileChangeWatcher = New FileChangeWatcher(workspace.GetService(Of IAsynchronousOperationListenerProvider)(), Task.FromResult(Of IVsAsyncFileChangeEx2)(fileChangeService)) 153Await workspace.GetService(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync() 181Dim fileChangeWatcher = New FileChangeWatcher(workspace.GetService(Of IAsynchronousOperationListenerProvider)(), Task.FromResult(Of IVsAsyncFileChangeEx2)(fileChangeService)) 191Await workspace.GetService(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync() 201Await workspace.GetService(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync() 207Await workspace.GetService(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync() 230Dim fileChangeWatcher = New FileChangeWatcher(workspace.GetService(Of IAsynchronousOperationListenerProvider)(), Task.FromResult(Of IVsAsyncFileChangeEx2)(fileChangeService)) 239Await workspace.GetService(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync() 245Await workspace.GetService(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync() 268Dim fileChangeWatcher = New FileChangeWatcher(workspace.GetService(Of IAsynchronousOperationListenerProvider)(), Task.FromResult(Of IVsAsyncFileChangeEx2)(fileChangeService)) 273Await workspace.GetService(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync()
PullMemberUp\PullMemberUpViewModelTest.vb (1)
263workspace.GetService(Of IUIThreadOperationExecutor),
Snippets\CSharpSnippetExpansionClientTests.vb (1)
312Dim editorOptionsService = workspace.GetService(Of EditorOptionsService)()
Snippets\VisualBasicSnippetExpansionClientTests.vb (1)
353Dim optionsService = workspace.GetService(Of EditorOptionsService)()
SolutionExplorer\AnalyzerItemsSourceTests.vb (2)
29Dim analyzerFolder = New AnalyzersFolderItem(workspace.GetService(Of IThreadingContext), workspace, project.Id, Nothing, Nothing) 30Dim listenerProvider = workspace.GetService(Of IAsynchronousOperationListenerProvider)
SolutionExplorer\AnalyzerItemTests.vb (2)
28Dim analyzerFolder = New AnalyzersFolderItem(workspace.GetService(Of IThreadingContext), workspace, project.Id, Nothing, Nothing) 47Dim analyzerFolder = New AnalyzersFolderItem(workspace.GetService(Of IThreadingContext), workspace, project.Id, Nothing, Nothing)
SolutionExplorer\AnalyzersFolderItemTests.vb (2)
27Dim analyzerFolder = New AnalyzersFolderItem(workspace.GetService(Of IThreadingContext), workspace, project.Id, Nothing, Nothing) 45Dim analyzerFolder = New AnalyzersFolderItem(workspace.GetService(Of IThreadingContext), workspace, project.Id, Nothing, Nothing)
SolutionExplorer\CpsDiagnosticItemSourceTests.vb (2)
44Dim listenerProvider = workspace.GetService(Of IAsynchronousOperationListenerProvider) 46workspace.GetService(Of IThreadingContext),
SolutionExplorer\SourceGeneratorItemTests.vb (6)
273workspace.GetService(Of IThreadingContext), 274New AnalyzerItem(New AnalyzersFolderItem(workspace.GetService(Of IThreadingContext), workspace, projectId, Nothing, Nothing), analyzerReference, Nothing), 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)