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