@@ -36,6 +36,7 @@ protected override IRemoteCompletionService CreateService(in ServiceArgs args)
36
36
37
37
private readonly RazorCompletionListProvider _razorCompletionListProvider = args . ExportProvider . GetExportedValue < RazorCompletionListProvider > ( ) ;
38
38
private readonly CompletionListCache _completionListCache = args . ExportProvider . GetExportedValue < CompletionListCache > ( ) ;
39
+ private readonly RoslynCompletionListCacheWrapper _roslynCompletionListCacheWrapper = args . ExportProvider . GetExportedValue < RoslynCompletionListCacheWrapper > ( ) ;
39
40
private readonly IClientCapabilitiesService _clientCapabilitiesService = args . ExportProvider . GetExportedValue < IClientCapabilitiesService > ( ) ;
40
41
private readonly CompletionTriggerAndCommitCharacters _triggerAndCommitCharacters = args . ExportProvider . GetExportedValue < CompletionTriggerAndCommitCharacters > ( ) ;
41
42
private readonly IRazorFormattingService _formattingService = args . ExportProvider . GetExportedValue < IRazorFormattingService > ( ) ;
@@ -204,16 +205,15 @@ private async ValueTask<Response> GetCompletionAsync(
204
205
VSInternalCompletionList ? completionList = null ;
205
206
using ( _telemetryReporter . TrackLspRequest ( Methods . TextDocumentCompletionName , Constants . ExternalAccessServerName , TelemetryThresholds . CompletionSubLSPTelemetryThreshold , correlationId ) )
206
207
{
207
- #pragma warning disable CS0618 // Type or member is obsolete. Will be addressed in a future PR but Roslyn changes are batched
208
208
completionList = await ExternalAccess . Razor . Cohost . Handlers . Completion . GetCompletionListAsync (
209
209
generatedDocument ,
210
210
mappedLinePosition ,
211
211
completionContext ,
212
212
clientCapabilities . SupportsVisualStudioExtensions ,
213
213
completionSetting ,
214
+ _roslynCompletionListCacheWrapper . GetCache ( ) ,
214
215
cancellationToken )
215
216
. ConfigureAwait ( false ) ;
216
- #pragma warning restore CS0618 // Type or member is obsolete
217
217
}
218
218
219
219
if ( completionList is null )
@@ -330,14 +330,13 @@ private async ValueTask<VSInternalCompletionItem> ResolveCSharpCompletionItemAsy
330
330
331
331
var clientCapabilities = _clientCapabilitiesService . ClientCapabilities ;
332
332
var completionListSetting = clientCapabilities . TextDocument ? . Completion ;
333
- #pragma warning disable CS0618 // Type or member is obsolete. Will be addressed in a future PR but Roslyn changes are batched
334
333
var result = await ExternalAccess . Razor . Cohost . Handlers . Completion . ResolveCompletionItemAsync (
335
334
request ,
336
335
generatedDocument ,
337
336
clientCapabilities . SupportsVisualStudioExtensions ,
338
337
completionListSetting ?? new ( ) ,
338
+ _roslynCompletionListCacheWrapper . GetCache ( ) ,
339
339
cancellationToken ) . ConfigureAwait ( false ) ;
340
- #pragma warning restore CS0618 // Type or member is obsolete
341
340
342
341
var item = JsonHelpers . Convert < CompletionItem , VSInternalCompletionItem > ( result ) . AssumeNotNull ( ) ;
343
342
0 commit comments