Skip to content

Commit 1bed9ee

Browse files
committed
Suppress obsolete warnings for now
1 parent 7f675b5 commit 1bed9ee

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/Completion/RemoteCompletionService.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,7 @@ private async ValueTask<Response> GetCompletionAsync(
204204
VSInternalCompletionList? completionList = null;
205205
using (_telemetryReporter.TrackLspRequest(Methods.TextDocumentCompletionName, Constants.ExternalAccessServerName, TelemetryThresholds.CompletionSubLSPTelemetryThreshold, correlationId))
206206
{
207+
#pragma warning disable CS0618 // Type or member is obsolete. Will be addressed in a future PR but Roslyn changes are batched
207208
completionList = await ExternalAccess.Razor.Cohost.Handlers.Completion.GetCompletionListAsync(
208209
generatedDocument,
209210
mappedLinePosition,
@@ -212,6 +213,7 @@ private async ValueTask<Response> GetCompletionAsync(
212213
completionSetting,
213214
cancellationToken)
214215
.ConfigureAwait(false);
216+
#pragma warning restore CS0618 // Type or member is obsolete
215217
}
216218

217219
if (completionList is null)
@@ -328,12 +330,14 @@ private async ValueTask<VSInternalCompletionItem> ResolveCSharpCompletionItemAsy
328330

329331
var clientCapabilities = _clientCapabilitiesService.ClientCapabilities;
330332
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
331334
var result = await ExternalAccess.Razor.Cohost.Handlers.Completion.ResolveCompletionItemAsync(
332335
request,
333336
generatedDocument,
334337
clientCapabilities.SupportsVisualStudioExtensions,
335338
completionListSetting ?? new(),
336339
cancellationToken).ConfigureAwait(false);
340+
#pragma warning restore CS0618 // Type or member is obsolete
337341

338342
var item = JsonHelpers.Convert<CompletionItem, VSInternalCompletionItem>(result).AssumeNotNull();
339343

src/Razor/src/Microsoft.CodeAnalysis.Remote.Razor/InlayHints/RemoteInlayHintService.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,9 @@ protected override IRemoteInlayHintService CreateService(in ServiceArgs args)
6767
var textDocument = inlayHintParams.TextDocument.WithUri(generatedDocument.CreateUri());
6868
var range = projectedLinePositionSpan.ToRange();
6969

70+
#pragma warning disable CS0618 // Type or member is obsolete. Will be addressed in a future PR but Roslyn changes are batched
7071
var hints = await InlayHints.GetInlayHintsAsync(generatedDocument, textDocument, range, displayAllOverride, cancellationToken).ConfigureAwait(false);
71-
72+
#pragma warning restore CS0618 // Type or member is obsolete
7273
if (hints is null)
7374
{
7475
return null;
@@ -130,6 +131,8 @@ private async ValueTask<InlayHint> ResolveInlayHintAsync(RemoteDocumentContext c
130131
.GetGeneratedDocumentAsync(cancellationToken)
131132
.ConfigureAwait(false);
132133

134+
#pragma warning disable CS0618 // Type or member is obsolete. Will be addressed in a future PR but Roslyn changes are batched
133135
return await InlayHints.ResolveInlayHintAsync(generatedDocument, inlayHint, cancellationToken).ConfigureAwait(false);
136+
#pragma warning restore CS0618 // Type or member is obsolete
134137
}
135138
}

0 commit comments

Comments
 (0)