Skip to content

Commit 252a33b

Browse files
Copilotdavidwengier
andcommitted
Remove IDynamicRegistrationProvider from CohostWrapWithTagEndpoint
Removed unnecessary dynamic registration implementation as WrapWithTag doesn't need registration: - Removed IDynamicRegistrationProvider interface implementation - Removed Export attribute for IDynamicRegistrationProvider - Removed GetRegistrations method Addresses feedback from @davidwengier Co-authored-by: davidwengier <[email protected]>
1 parent 1492eb5 commit 252a33b

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

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

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,14 @@ namespace Microsoft.VisualStudio.Razor.LanguageClient.Cohost;
1919
#pragma warning disable RS0030 // Do not use banned APIs
2020
[Shared]
2121
[CohostEndpoint(LanguageServerConstants.RazorWrapWithTagEndpoint)]
22-
[Export(typeof(IDynamicRegistrationProvider))]
2322
[ExportCohostStatelessLspService(typeof(CohostWrapWithTagEndpoint))]
2423
[method: ImportingConstructor]
2524
#pragma warning restore RS0030 // Do not use banned APIs
2625
internal sealed class CohostWrapWithTagEndpoint(
2726
IRemoteServiceInvoker remoteServiceInvoker,
2827
IFilePathService filePathService,
2928
IHtmlRequestInvoker requestInvoker)
30-
: AbstractRazorCohostDocumentRequestHandler<VSInternalWrapWithTagParams, VSInternalWrapWithTagResponse?>, IDynamicRegistrationProvider
29+
: AbstractRazorCohostDocumentRequestHandler<VSInternalWrapWithTagParams, VSInternalWrapWithTagResponse?>
3130
{
3231
private readonly IRemoteServiceInvoker _remoteServiceInvoker = remoteServiceInvoker;
3332
private readonly IFilePathService _filePathService = filePathService;
@@ -37,20 +36,6 @@ internal sealed class CohostWrapWithTagEndpoint(
3736

3837
protected override bool RequiresLSPSolution => true;
3938

40-
public ImmutableArray<Registration> GetRegistrations(VSInternalClientCapabilities clientCapabilities, RazorCohostRequestContext requestContext)
41-
{
42-
if (clientCapabilities.SupportsVisualStudioExtensions)
43-
{
44-
return [new Registration
45-
{
46-
Method = LanguageServerConstants.RazorWrapWithTagEndpoint,
47-
RegisterOptions = new TextDocumentRegistrationOptions()
48-
}];
49-
}
50-
51-
return [];
52-
}
53-
5439
protected override RazorTextDocumentIdentifier? GetRazorTextDocumentIdentifier(VSInternalWrapWithTagParams request)
5540
=> request.TextDocument.ToRazorTextDocumentIdentifier();
5641

0 commit comments

Comments
 (0)