Skip to content

Commit 1f221b6

Browse files
committed
Fix base class after merge
1 parent 3c42a6d commit 1f221b6

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/Razor/src/Microsoft.VisualStudio.LanguageServices.Razor/LanguageClient/Cohost/CohostWrapWithTagEndpoint.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using Microsoft.CodeAnalysis;
1010
using Microsoft.CodeAnalysis.ExternalAccess.Razor;
1111
using Microsoft.CodeAnalysis.ExternalAccess.Razor.Cohost;
12+
using Microsoft.CodeAnalysis.Razor.Cohost;
1213
using Microsoft.CodeAnalysis.Razor.Formatting;
1314
using Microsoft.CodeAnalysis.Razor.Logging;
1415
using Microsoft.CodeAnalysis.Razor.Protocol;
@@ -29,8 +30,9 @@ internal sealed class CohostWrapWithTagEndpoint(
2930
IRemoteServiceInvoker remoteServiceInvoker,
3031
IHtmlRequestInvoker requestInvoker,
3132
LSPDocumentManager documentManager,
33+
IIncompatibleProjectService incompatibleProjectService,
3234
ILoggerFactory loggerFactory)
33-
: AbstractRazorCohostDocumentRequestHandler<VSInternalWrapWithTagParams, VSInternalWrapWithTagResponse?>
35+
: AbstractCohostDocumentEndpoint<VSInternalWrapWithTagParams, VSInternalWrapWithTagResponse?>(incompatibleProjectService)
3436
{
3537
private readonly IRemoteServiceInvoker _remoteServiceInvoker = remoteServiceInvoker;
3638
private readonly IHtmlRequestInvoker _requestInvoker = requestInvoker;
@@ -44,10 +46,7 @@ internal sealed class CohostWrapWithTagEndpoint(
4446
protected override RazorTextDocumentIdentifier? GetRazorTextDocumentIdentifier(VSInternalWrapWithTagParams request)
4547
=> request.TextDocument.ToRazorTextDocumentIdentifier();
4648

47-
protected override Task<VSInternalWrapWithTagResponse?> HandleRequestAsync(VSInternalWrapWithTagParams request, RazorCohostRequestContext context, CancellationToken cancellationToken)
48-
=> HandleRequestAsync(request, context.TextDocument.AssumeNotNull(), cancellationToken);
49-
50-
private async Task<VSInternalWrapWithTagResponse?> HandleRequestAsync(VSInternalWrapWithTagParams request, TextDocument razorDocument, CancellationToken cancellationToken)
49+
protected override async Task<VSInternalWrapWithTagResponse?> HandleRequestAsync(VSInternalWrapWithTagParams request, TextDocument razorDocument, CancellationToken cancellationToken)
5150
{
5251
// First, check if the position is valid for wrap with tag operation through the remote service
5352
var range = request.Range.ToLinePositionSpan();

src/Razor/test/Microsoft.VisualStudio.LanguageServices.Razor.Test/Cohost/CohostWrapWithTagEndpointTest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ private async Task VerifyWrapWithTagAsync(TestCode input, string? expected, VSIn
203203
documentManager.AddDocument(documentUri, documentSnapshot);
204204
}
205205

206-
var endpoint = new CohostWrapWithTagEndpoint(RemoteServiceInvoker, requestInvoker, documentManager, LoggerFactory);
206+
var endpoint = new CohostWrapWithTagEndpoint(RemoteServiceInvoker, requestInvoker, documentManager, IncompatibleProjectService, LoggerFactory);
207207

208208
var request = new VSInternalWrapWithTagParams(
209209
sourceText.GetRange(input.Span),

0 commit comments

Comments
 (0)