Class RDCoreLanguageClientHost<TApp>
Simplifies implementing a RDCore LSP client application.
public abstract class RDCoreLanguageClientHost<TApp> : AppHost<TApp>, IDisposable where TApp : class, IRDCoreClientApp
Type Parameters
TAppA specific class type implementing IRDCoreClientApp.
- Inheritance
-
AppHost<TApp>RDCoreLanguageClientHost<TApp>
- Implements
- Inherited Members
Remarks
🧩 override templated methods to customize your application.
- Implement AppHost<TApp>.Configure(IConfiguration, Microsoft.Extensions.DependencyInjection.IServiceCollection, string[]) to override the default IConfiguration providers.
- Implement ConfigureExternalLogging(IServiceCollection, ILoggingBuilder, IConfiguration) to override the default ILoggingBuilder providers.
Constructors
RDCoreLanguageClientHost()
Simplifies implementing a RDCore LSP client application.
protected RDCoreLanguageClientHost()
Remarks
🧩 override templated methods to customize your application.
- Implement AppHost<TApp>.Configure(IConfiguration, Microsoft.Extensions.DependencyInjection.IServiceCollection, string[]) to override the default IConfiguration providers.
- Implement ConfigureExternalLogging(IServiceCollection, ILoggingBuilder, IConfiguration) to override the default ILoggingBuilder providers.
Methods
AfterAppRunAsync(IServiceProvider)
Keeps the client process alive for the lifetime of the JSON-RPC connection.
protected override Task AfterAppRunAsync(IServiceProvider provider)
Parameters
providerIServiceProvider
Returns
Remarks
RunAsync(IServiceProvider, string[]) returns as soon as the language client is
connected and initialized. A standalone client process (e.g. rdc.exe) must not exit at
that point, otherwise the transport pipe closes and the language server tears down. Block here until the host
is asked to stop (Ctrl+C / SIGTERM, surfaced as ApplicationStopping)
or ProcessTokenSource is cancelled.
Configure(IConfigurationBuilder, IServiceCollection, string[])
Override to supply application-specific IConfiguration configuration.
protected override sealed void Configure(IConfigurationBuilder configuration, IServiceCollection services, string[] args)
Parameters
configurationIConfigurationBuilderservicesIServiceCollectionargsstring[]Any command-line arguments that were supplied to the application, parsed into SdkAppOptions.
Remarks
🧩 The base implementation binds and configures appsettings.json options, with command-line arguments as overrides.
ConfigureOverrides(string[], SdkAppCommandLineArgs)
Override to supply additional command-line argument configuration overrides.
protected virtual IEnumerable<(string, string?)> ConfigureOverrides(string[] initialArgs, SdkAppCommandLineArgs baseArgs)
Parameters
initialArgsstring[]The command-line arguments as received.
baseArgsSdkAppCommandLineArgsThe arguments as base SDK app configuration.
Returns
- IEnumerable<(string, string)>