157 references to GetService
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (41)
BlockCommentEditing\CloseBlockCommentTests.cs (1)
285
var globalOptions = workspace.
GetService
<IGlobalOptionService>();
Classification\SemanticClassifierTests.cs (2)
3921
workspace.
GetService
<TaggerHost>(),
3922
workspace.
GetService
<ClassificationTypeMap>());
Classification\SyntacticTaggerTests.cs (2)
46
workspace.
GetService
<TaggerHost>(),
100
workspace.
GetService
<TaggerHost>(),
Classification\TotalClassifierTests.cs (4)
3063
workspace.
GetService
<TaggerHost>(),
3064
workspace.
GetService
<ClassificationTypeMap>());
3165
workspace.
GetService
<IThreadingContext>(),
3166
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)
3136
var commandHandler = workspace.
GetService
<FormatCommandHandler>();
Formatting\Indentation\SmartIndenterTests.cs (1)
3551
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)
128
var service = workspace.
GetService
<IMetadataAsSourceFileService>();
PdbSourceDocument\ImplementationAssemblyLookupServiceTests.cs (10)
54
var service = workspace.
GetService
<IImplementationAssemblyLookupService>();
93
var service = workspace.
GetService
<IImplementationAssemblyLookupService>();
135
var service = workspace.
GetService
<IImplementationAssemblyLookupService>();
187
var service = workspace.
GetService
<IImplementationAssemblyLookupService>();
247
var service = workspace.
GetService
<IImplementationAssemblyLookupService>();
308
var service = workspace.
GetService
<IImplementationAssemblyLookupService>();
363
var service = workspace.
GetService
<IImplementationAssemblyLookupService>();
414
var service = workspace.
GetService
<IImplementationAssemblyLookupService>();
479
var service = workspace.
GetService
<IImplementationAssemblyLookupService>();
550
var service = workspace.
GetService
<IImplementationAssemblyLookupService>();
PdbSourceDocument\PdbSourceDocumentTests.cs (5)
880
var service = workspace.
GetService
<IMetadataAsSourceFileService>();
969
var service = workspace.
GetService
<IMetadataAsSourceFileService>();
994
var service = workspace.
GetService
<IMetadataAsSourceFileService>();
1020
var service = workspace.
GetService
<IMetadataAsSourceFileService>();
1045
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 (20)
AbstractCommandHandlerTestState.cs (1)
135
=> Workspace.
GetService
<T>();
AutomaticCompletion\AbstractAutomaticBraceCompletionTests.cs (1)
152
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 (1)
34
_listenerProvider = workspace.
GetService
<IAsynchronousOperationListenerProvider>();
DocumentationComments\AbstractDocumentationCommentTests.cs (2)
142
var optionsFactory = workspace.
GetService
<IEditorOptionsFactoryService>();
161
workspace.
GetService
<IEditorOperationsFactoryService>());
Formatting\CoreFormatterTestsBase.cs (5)
77
var editorOptionsFactory = workspace.
GetService
<IEditorOptionsFactoryService>();
116
workspace.
GetService
<EditorOptionsService>());
143
var commandHandler = workspace.
GetService
<FormatCommandHandler>();
252
var commandHandler = workspace.
GetService
<FormatCommandHandler>();
259
var commandHandler = workspace.
GetService
<FormatCommandHandler>();
NavigateTo\AbstractNavigateToTests.cs (4)
82
workspace.
GetService
<IThreadingContext>(),
83
workspace.
GetService
<IUIThreadOperationExecutor>(),
156
workspace.
GetService
<IThreadingContext>(),
157
workspace.
GetService
<IUIThreadOperationExecutor>(),
Workspaces\EditorTestHostDocument.cs (1)
169
var threadingContext = workspace.
GetService
<IThreadingContext>();
Workspaces\EditorTestWorkspace.cs (1)
281
var projectionBufferFactory = this.
GetService
<IProjectionBufferFactoryService>();
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (30)
CodeRefactorings\CodeRefactoringServiceTest.cs (6)
46
var refactoringService = workspace.
GetService
<ICodeRefactoringService>();
86
var refactoringService = workspace.
GetService
<ICodeRefactoringService>();
104
var refactoringService = workspace.
GetService
<ICodeRefactoringService>();
159
var refactoringService = workspace.
GetService
<ICodeRefactoringService>();
198
var refactoringService = workspace.
GetService
<ICodeRefactoringService>();
243
var refactoringService = (CodeRefactorings.CodeRefactoringService)workspace.
GetService
<ICodeRefactoringService>();
Diagnostics\DiagnosticAnalyzerServiceTests.cs (2)
453
var globalOptions = workspace.
GetService
<IGlobalOptionService>();
791
var globalOptions = workspace.
GetService
<IGlobalOptionService>();
EditAndContinue\EditAndContinueLanguageServiceTests.cs (13)
62
var listenerProvider = workspace.
GetService
<MockWorkspaceEventListenerProvider>();
65
((MockServiceBroker)workspace.
GetService
<IServiceBrokerProvider>().ServiceBroker).CreateService = t => t switch
71
((MockHostWorkspaceProvider)workspace.
GetService
<IHostWorkspaceProvider>()).Workspace = workspace;
75
languageService = workspace.
GetService
<EditAndContinueLanguageService>();
106
var globalOptions = localWorkspace.
GetService
<IGlobalOptionService>();
107
((MockHostWorkspaceProvider)localWorkspace.
GetService
<IHostWorkspaceProvider>()).Workspace = localWorkspace;
109
((MockServiceBroker)localWorkspace.
GetService
<IServiceBrokerProvider>().ServiceBroker).CreateService = t => t switch
117
mockEncService = (MockEditAndContinueService)localWorkspace.
GetService
<IEditAndContinueService>();
119
var localService = localWorkspace.
GetService
<EditAndContinueLanguageService>();
130
var sessionState = localWorkspace.
GetService
<IEditAndContinueSessionTracker>();
131
var diagnosticRefresher = localWorkspace.
GetService
<IDiagnosticsRefresher>();
355
var sourceTextProvider = workspace.
GetService
<PdbMatchingSourceTextProvider>();
389
await workspace.
GetService
<AsynchronousOperationListenerProvider>().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync();
MetadataAsSource\AbstractMetadataAsSourceTests.TestContext.cs (1)
72
_metadataAsSourceService = Workspace.
GetService
<IMetadataAsSourceFileService>();
RenameTracking\RenameTrackingTestState.cs (5)
84
EditorOperations = Workspace.
GetService
<IEditorOperationsFactoryService>().GetEditorOperations(_view);
98
Workspace.
GetService
<IThreadingContext>(),
99
Workspace.
GetService
<IInlineRenameService>(),
100
Workspace.
GetService
<IGlobalOptionService>(),
101
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)
159
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)
162
var globalOptionService = workspace.
GetService
<IGlobalOptionService>();
Options\SolutionAnalyzerConfigOptionsUpdaterTests.cs (4)
30
var listenerProvider = workspace.
GetService
<MockWorkspaceEventListenerProvider>();
41
var globalOptions = workspace.
GetService
<IGlobalOptionService>();
111
var globalOptions = workspace.
GetService
<IGlobalOptionService>();
272
var globalOptions = workspace.
GetService
<IGlobalOptionService>();
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
Workspaces\TestWorkspace`1.cs (2)
74
var workspaceConfigurationService =
GetService
<TestWorkspaceConfigurationService>();
89
this.GlobalOptions =
GetService
<IGlobalOptionService>();
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (3)
DocumentOutline\DocumentOutlineTestsBase.cs (1)
75
var threadingContext = workspace.
GetService
<IThreadingContext>();
Interactive\Commands\ResetInteractiveTests.cs (2)
80
var uiThreadOperationExecutor = workspace.
GetService
<IUIThreadOperationExecutor>();
81
var editorOptionsService = workspace.
GetService
<EditorOptionsService>();
Microsoft.VisualStudio.LanguageServices.Test.Utilities2 (3)
CallHierarchy\CallHierarchyTestState.vb (3)
93
Dim provider = workspace.
GetService
(Of CallHierarchyProvider)()
100
Dim threadOperationExecutor = workspace.
GetService
(Of IUIThreadOperationExecutor)
101
Dim asynchronousOperationListenerProvider = workspace.
GetService
(Of IAsynchronousOperationListenerProvider)()
Microsoft.VisualStudio.LanguageServices.UnitTests (50)
CommonControls\MemberSelectionViewModelTests.vb (1)
188
workspace.
GetService
(Of IUIThreadOperationExecutor),
Diagnostics\ExternalDiagnosticUpdateSourceTests.vb (8)
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)
MoveStaticMembers\MoveStaticMembersViewModelTest.vb (1)
42
workspace.
GetService
(Of IUIThreadOperationExecutor))
Options\BasicEditorConfigGeneratorTests.vb (2)
162
Dim editorConfigOptions = workspace.
GetService
(Of EditorConfigOptionsEnumerator).GetOptions(LanguageNames.VisualBasic)
313
Dim editorConfigOptions = workspace.
GetService
(Of EditorConfigOptionsEnumerator).GetOptions(LanguageNames.VisualBasic)
Options\CSharpEditorConfigGeneratorTests.vb (2)
269
Dim groupedOptions = workspace.
GetService
(Of EditorConfigOptionsEnumerator).GetOptions(LanguageNames.CSharp)
528
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)
49
Dim fileChangeWatcher = New FileChangeWatcher(workspace.
GetService
(Of IAsynchronousOperationListenerProvider)(), Task.FromResult(Of IVsAsyncFileChangeEx2)(fileChangeService))
56
Await workspace.
GetService
(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync()
60
Await workspace.
GetService
(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync()
93
Dim fileChangeWatcher = New FileChangeWatcher(workspace.
GetService
(Of IAsynchronousOperationListenerProvider)(), Task.FromResult(Of IVsAsyncFileChangeEx2)(fileChangeService))
100
Await workspace.
GetService
(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync()
104
Await workspace.
GetService
(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync()
137
Dim fileChangeWatcher = New FileChangeWatcher(workspace.
GetService
(Of IAsynchronousOperationListenerProvider)(), Task.FromResult(Of IVsAsyncFileChangeEx2)(fileChangeService))
150
Await workspace.
GetService
(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync()
178
Dim fileChangeWatcher = New FileChangeWatcher(workspace.
GetService
(Of IAsynchronousOperationListenerProvider)(), Task.FromResult(Of IVsAsyncFileChangeEx2)(fileChangeService))
188
Await workspace.
GetService
(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync()
198
Await workspace.
GetService
(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync()
204
Await workspace.
GetService
(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync()
227
Dim fileChangeWatcher = New FileChangeWatcher(workspace.
GetService
(Of IAsynchronousOperationListenerProvider)(), Task.FromResult(Of IVsAsyncFileChangeEx2)(fileChangeService))
236
Await workspace.
GetService
(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync()
242
Await workspace.
GetService
(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync()
265
Dim fileChangeWatcher = New FileChangeWatcher(workspace.
GetService
(Of IAsynchronousOperationListenerProvider)(), Task.FromResult(Of IVsAsyncFileChangeEx2)(fileChangeService))
270
Await workspace.
GetService
(Of AsynchronousOperationListenerProvider)().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync()
PullMemberUp\PullMemberUpViewModelTest.vb (1)
262
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)
26
Dim analyzerFolder = New AnalyzersFolderItem(workspace.
GetService
(Of IThreadingContext), workspace, project.Id, Nothing, Nothing)
45
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 (2)
41
Dim listenerProvider = workspace.
GetService
(Of IAsynchronousOperationListenerProvider)
43
workspace.
GetService
(Of IThreadingContext),
SolutionExplorer\SourceGeneratorItemTests.vb (6)
271
workspace.
GetService
(Of IThreadingContext),
272
New AnalyzerItem(New AnalyzersFolderItem(workspace.
GetService
(Of IThreadingContext), workspace, projectId, Nothing, Nothing), analyzerReference, Nothing),
274
workspace.
GetService
(Of IAsynchronousOperationListenerProvider))
278
Dim asyncListener = workspace.
GetService
(Of IAsynchronousOperationListenerProvider).GetListener(FeatureAttribute.SourceGenerators)
280
Return New SourceGeneratedFileItemSource(generatorItem, workspace.
GetService
(Of IThreadingContext), workspace, asyncListener)
284
Dim service = workspace.
GetService
(Of AsynchronousOperationListenerProvider)