@@ -22,19 +22,15 @@ namespace Microsoft.CodeAnalysis.ExternalAccess.Razor.Cohost;
2222[ method: Obsolete ( MefConstruction . ImportingConstructorMessage , error : true ) ]
2323internal sealed class RazorStartupServiceFactory (
2424 [ Import ( AllowDefault = true ) ] IUIContextActivationService ? uIContextActivationService ,
25- [ Import ( AllowDefault = true ) ] Lazy < IRazorCohostDynamicRegistrationService > ? dynamicRegistrationService ,
2625 [ Import ( AllowDefault = true ) ] Lazy < ICohostStartupService > ? cohostStartupService ) : ILspServiceFactory
2726{
2827 public ILspService CreateILspService ( LspServices lspServices , WellKnownLspServerKinds serverKind )
2928 {
30- return new RazorStartupService ( uIContextActivationService , dynamicRegistrationService , cohostStartupService ) ;
29+ return new RazorStartupService ( uIContextActivationService , cohostStartupService ) ;
3130 }
3231
3332 private class RazorStartupService (
3433 IUIContextActivationService ? uIContextActivationService ,
35- #pragma warning disable CS0618 // Type or member is obsolete
36- Lazy < IRazorCohostDynamicRegistrationService > ? dynamicRegistrationService ,
37- #pragma warning restore CS0618 // Type or member is obsolete
3834 Lazy < ICohostStartupService > ? cohostStartupService ) : ILspService , IOnInitialized , IDisposable
3935 {
4036 private readonly CancellationTokenSource _disposalTokenSource = new ( ) ;
@@ -55,7 +51,7 @@ public Task OnInitializedAsync(ClientCapabilities clientCapabilities, RequestCon
5551 return Task . CompletedTask ;
5652 }
5753
58- if ( dynamicRegistrationService is null && cohostStartupService is null )
54+ if ( cohostStartupService is null )
5955 {
6056 return Task . CompletedTask ;
6157 }
@@ -96,11 +92,6 @@ private async Task InitializeRazorAsync(ClientCapabilities clientCapabilities, R
9692 {
9793 await cohostStartupService . Value . StartupAsync ( serializedClientCapabilities , requestContext , cancellationToken ) . ConfigureAwait ( false ) ;
9894 }
99-
100- if ( dynamicRegistrationService is not null )
101- {
102- await dynamicRegistrationService . Value . RegisterAsync ( serializedClientCapabilities , requestContext , cancellationToken ) . ConfigureAwait ( false ) ;
103- }
10495 }
10596 }
10697}
0 commit comments