140 references to GetService
IdeBenchmarks (2)
Lsp\LspCompletionBenchmarks.cs (1)
96
_globalOptionService = _testServer.TestWorkspace.
GetService
<IGlobalOptionService>();
Lsp\LspCompletionSerializationBenchmarks.cs (1)
102
var globalOptions = testServer.TestWorkspace.
GetService
<IGlobalOptionService>();
Microsoft.CodeAnalysis.CSharp.EditorFeatures.UnitTests (47)
BlockCommentEditing\CloseBlockCommentTests.cs (1)
217
var globalOptions = workspace.
GetService
<IGlobalOptionService>();
Classification\SemanticClassifierTests.cs (2)
3595
workspace.
GetService
<TaggerHost>(),
3596
workspace.
GetService
<ClassificationTypeMap>());
Classification\SyntacticTaggerTests.cs (2)
46
workspace.
GetService
<TaggerHost>(),
100
workspace.
GetService
<TaggerHost>(),
Classification\TotalClassifierTests.cs (4)
2858
workspace.
GetService
<TaggerHost>(),
2859
workspace.
GetService
<ClassificationTypeMap>());
2972
workspace.
GetService
<IThreadingContext>(),
2973
workspace.
GetService
<ClassificationTypeMap>(),
CommentSelection\CSharpCommentSelectionTests.cs (3)
117
workspace.
GetService
<ITextUndoHistoryRegistry>(),
118
workspace.
GetService
<IEditorOperationsFactoryService>(),
119
workspace.
GetService
<EditorOptionsService>());
CompleteStatement\CSharpCompleteStatementCommandHandlerTests.cs (1)
4207
var globalOptions = workspace.
GetService
<IGlobalOptionService>();
EventHookup\EventHookupTestState.cs (6)
37
Workspace.
GetService
<IThreadingContext>(),
38
Workspace.
GetService
<IInlineRenameService>(),
39
Workspace.
GetService
<EventHookupSessionManager>(),
40
Workspace.
GetService
<IGlobalOptionService>(),
41
Workspace.
GetService
<IAsynchronousOperationListenerProvider>());
96
var service = (MockSuggestionService)Workspace.
GetService
<SuggestionServiceBase>();
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)
2867
var commandHandler = workspace.
GetService
<FormatCommandHandler>();
Formatting\Indentation\SmartIndenterTests.cs (1)
3498
var editorOptionsService = workspace.
GetService
<EditorOptionsService>();
Formatting\Indentation\SmartTokenFormatterFormatRangeTests.cs (2)
3075
var optionsService = workspace.
GetService
<EditorOptionsService>();
3079
var commandHandler = workspace.
GetService
<FormatCommandHandler>();
Interactive\BraceMatching\InteractiveBraceHighlightingTests.cs (2)
36
workspace.
GetService
<TaggerHost>(),
37
workspace.
GetService
<IBraceMatchingService>());
Organizing\OrganizeTypeDeclarationTests.cs (1)
1079
workspace.
GetService
<IThreadingContext>(),
PdbSourceDocument\AbstractPdbSourceDocumentTests.cs (1)
128
var service = workspace.
GetService
<IMetadataAsSourceFileService>();
PdbSourceDocument\ImplementationAssemblyLookupServiceTests.cs (10)
51
var service = workspace.
GetService
<IImplementationAssemblyLookupService>();
86
var service = workspace.
GetService
<IImplementationAssemblyLookupService>();
124
var service = workspace.
GetService
<IImplementationAssemblyLookupService>();
172
var service = workspace.
GetService
<IImplementationAssemblyLookupService>();
228
var service = workspace.
GetService
<IImplementationAssemblyLookupService>();
285
var service = workspace.
GetService
<IImplementationAssemblyLookupService>();
336
var service = workspace.
GetService
<IImplementationAssemblyLookupService>();
383
var service = workspace.
GetService
<IImplementationAssemblyLookupService>();
444
var service = workspace.
GetService
<IImplementationAssemblyLookupService>();
514
var service = workspace.
GetService
<IImplementationAssemblyLookupService>();
PdbSourceDocument\PdbSourceDocumentTests.cs (5)
780
var service = workspace.
GetService
<IMetadataAsSourceFileService>();
867
var service = workspace.
GetService
<IMetadataAsSourceFileService>();
888
var service = workspace.
GetService
<IMetadataAsSourceFileService>();
910
var service = workspace.
GetService
<IMetadataAsSourceFileService>();
931
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)
113
=> 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)
286
var projectionBufferFactory = this.
GetService
<IProjectionBufferFactoryService>();
Microsoft.CodeAnalysis.EditorFeatures.UnitTests (34)
CodeRefactorings\CodeRefactoringServiceTest.cs (6)
46
var refactoringService = workspace.
GetService
<ICodeRefactoringService>();
85
var refactoringService = workspace.
GetService
<ICodeRefactoringService>();
103
var refactoringService = workspace.
GetService
<ICodeRefactoringService>();
156
var refactoringService = workspace.
GetService
<ICodeRefactoringService>();
195
var refactoringService = workspace.
GetService
<ICodeRefactoringService>();
240
var refactoringService = (CodeRefactorings.CodeRefactoringService)workspace.
GetService
<ICodeRefactoringService>();
Diagnostics\DiagnosticAnalyzerServiceTests.cs (2)
451
var globalOptions = workspace.
GetService
<IGlobalOptionService>();
912
var globalOptions = workspace.
GetService
<IGlobalOptionService>();
EditAndContinue\EditorManagedHotReloadLanguageServiceTests.cs (17)
141
var listenerProvider = workspace.
GetService
<MockWorkspaceEventListenerProvider>();
144
((MockServiceBroker)workspace.
GetService
<IServiceBrokerProvider>().ServiceBroker).CreateService = t => t switch
150
((MockHostWorkspaceProvider)workspace.
GetService
<IHostWorkspaceProvider>()).Workspace = workspace;
155
var factory = workspace.
GetService
<ManagedHotReloadLanguageServiceFactory>();
156
var serviceBroker = workspace.
GetService
<IServiceBrokerProvider>().ServiceBroker;
157
var solutionSnapshotProvider = workspace.
GetService
<ISolutionSnapshotProvider>();
263
var globalOptions = localWorkspace.
GetService
<IGlobalOptionService>();
264
((MockHostWorkspaceProvider)localWorkspace.
GetService
<IHostWorkspaceProvider>()).Workspace = localWorkspace;
266
((MockServiceBroker)localWorkspace.
GetService
<IServiceBrokerProvider>().ServiceBroker).CreateService = t => t switch
274
mockEncService = (MockEditAndContinueService)localWorkspace.
GetService
<IEditAndContinueService>();
276
var localFactory = localWorkspace.
GetService
<ManagedHotReloadLanguageServiceFactory>();
277
var localBroker = localWorkspace.
GetService
<IServiceBrokerProvider>().ServiceBroker;
278
var localSnapshotProvider = localWorkspace.
GetService
<ISolutionSnapshotProvider>();
290
var sessionState = localWorkspace.
GetService
<IEditAndContinueSessionTracker>();
291
var diagnosticRefresher = localWorkspace.
GetService
<IDiagnosticsRefresher>();
524
var sourceTextProvider = workspace.
GetService
<PdbMatchingSourceTextProvider>();
558
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)
160
var service = (EditAndContinueService)workspace.
GetService
<IEditAndContinueService>();
Microsoft.CodeAnalysis.Features.UnitTests (2)
EditAndContinue\RemoteEditAndContinueServiceTests.cs (2)
55
var globalOptions = localWorkspace.
GetService
<IGlobalOptionService>();
63
mockEncService = (MockEditAndContinueService)localWorkspace.
GetService
<IEditAndContinueService>();
Microsoft.CodeAnalysis.LanguageServer.Protocol.UnitTests (14)
Completion\CompletionFeaturesTests.cs (1)
1099
var globalOptions = testLspServer.TestWorkspace.
GetService
<IGlobalOptionService>();
Completion\CompletionTests.cs (1)
1409
var globalOptions = testLspServer.TestWorkspace.
GetService
<IGlobalOptionService>();
Configuration\DidChangeConfigurationNotificationHandlerTest.cs (1)
164
var globalOptionService = workspace.
GetService
<IGlobalOptionService>();
Diagnostics\AbstractPullDiagnosticTestsBase.cs (1)
67
var optionService = testLspServer.TestWorkspace.
GetService
<IGlobalOptionService>();
Diagnostics\PullDiagnosticTests.cs (5)
1335
var encSessionState = testLspServer.TestWorkspace.
GetService
<EditAndContinueSessionState>();
1367
var encSessionState = testLspServer.TestWorkspace.
GetService
<EditAndContinueSessionState>();
1368
var encService = (MockEditAndContinueService)testLspServer.TestWorkspace.
GetService
<IEditAndContinueService>();
1369
var diagnosticsRefresher = testLspServer.TestWorkspace.
GetService
<IDiagnosticsRefresher>();
2312
var listenerProvider = testLspServer.TestWorkspace.
GetService
<IAsynchronousOperationListenerProvider>();
Options\SolutionAnalyzerConfigOptionsUpdaterTests.cs (4)
32
var listenerProvider = workspace.
GetService
<MockWorkspaceEventListenerProvider>();
43
var globalOptions = workspace.
GetService
<IGlobalOptionService>();
113
var globalOptions = workspace.
GetService
<IGlobalOptionService>();
274
var globalOptions = workspace.
GetService
<IGlobalOptionService>();
Workspaces\LspWorkspaceManagerTests.cs (1)
266
var workspaceRegistrationService = testLspServer.TestWorkspace.
GetService
<LspWorkspaceRegistrationService>();
Microsoft.CodeAnalysis.LanguageServer.UnitTests (15)
FileBasedProgramsEntryPointDiscoveryTests.cs (3)
230
await testLspServer.TestWorkspace.
GetService
<AsynchronousOperationListenerProvider>().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync();
263
await testLspServer.TestWorkspace.
GetService
<AsynchronousOperationListenerProvider>().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync();
288
await testLspServer.TestWorkspace.
GetService
<AsynchronousOperationListenerProvider>().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync();
FileBasedProgramsWorkspaceTests.cs (12)
320
await testLspServer.TestWorkspace.
GetService
<AsynchronousOperationListenerProvider>().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync();
343
await testLspServer.TestWorkspace.
GetService
<AsynchronousOperationListenerProvider>().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync();
378
await testLspServer.TestWorkspace.
GetService
<AsynchronousOperationListenerProvider>().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync();
408
await testLspServer.TestWorkspace.
GetService
<AsynchronousOperationListenerProvider>().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync();
452
await testLspServer.TestWorkspace.
GetService
<AsynchronousOperationListenerProvider>().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync();
504
await testLspServer.TestWorkspace.
GetService
<AsynchronousOperationListenerProvider>().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync();
553
await testLspServer.TestWorkspace.
GetService
<AsynchronousOperationListenerProvider>().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync();
611
await testLspServer.TestWorkspace.
GetService
<AsynchronousOperationListenerProvider>().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync();
764
await testLspServer.TestWorkspace.
GetService
<AsynchronousOperationListenerProvider>().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync();
790
await testLspServer.TestWorkspace.
GetService
<AsynchronousOperationListenerProvider>().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync();
873
await testLspServer.TestWorkspace.
GetService
<AsynchronousOperationListenerProvider>().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync();
1147
await testLspServer.TestWorkspace.
GetService
<AsynchronousOperationListenerProvider>().GetWaiter(FeatureAttribute.Workspace).ExpeditedWaitAsync();
Microsoft.CodeAnalysis.Workspaces.Test.Utilities (2)
Workspaces\TestWorkspace`1.cs (2)
90
var workspaceConfigurationService =
GetService
<TestWorkspaceConfigurationService>();
105
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)
86
var uiThreadOperationExecutor = workspace.
GetService
<IUIThreadOperationExecutor>();
87
var editorOptionsService = workspace.
GetService
<EditorOptionsService>();