Table of Contents

Class RDCoreServerProcess

Namespace
RDCore.SDK.Client
Assembly
RDCore.SDK.dll

Represents a RDCore.SDK server application.

public class RDCoreServerProcess : IRDCoreServerProcess, IDisposable
Inheritance
RDCoreServerProcess
Implements
Inherited Members

Remarks

A language server application is any RDCore.SDK server platform application that can run a sidecar LSP server.

Constructors

RDCoreServerProcess(IFileSystem, IPlatformEnvironment, IOptions<SdkAppOptions>, ILogger<RDCoreServerProcess>)

Represents a RDCore.SDK server application.

public RDCoreServerProcess(IFileSystem FileSystem, IPlatformEnvironment PlatformEnvironment, IOptions<SdkAppOptions> Options, ILogger<RDCoreServerProcess> Logger)

Parameters

FileSystem IFileSystem

Provides an abstraction over the file system.

PlatformEnvironment IPlatformEnvironment
Options IOptions<SdkAppOptions>
Logger ILogger<RDCoreServerProcess>

A standard ILogger.

Remarks

A language server application is any RDCore.SDK server platform application that can run a sidecar LSP server.

Fields

ExternalMode

The mode rdc.exe runs as the external host in: the process that makes the calls a program makes to the outside world - the objects of automation servers, the functions of native libraries - so that a failure of the outside world takes down that process, and not the one that owns the session.

public const string ExternalMode = "external"

Field Value

string

HostMode

The mode rdc.exe runs as the environment host in: the process that owns the runtime session.

public const string HostMode = "host"

Field Value

string

ModeEnvironmentVariable

public const string ModeEnvironmentVariable = "RDCORE_MODE"

Field Value

string

Properties

ExitCode

The exit code of the process once it has exited; 0 otherwise.

public int ExitCode { get; }

Property Value

int

HasExited

Whether the server process has exited (or was never started).

public bool HasExited { get; }

Property Value

bool

ProcessId

The operating-system identifier of the server process.

public int ProcessId { get; }

Property Value

int

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

public void Dispose()

Dispose(bool)

protected virtual void Dispose(bool disposing)

Parameters

disposing bool

Shutdown()

Stops awaiting LSP server process exit to restart it.

public void Shutdown()

Remarks

This method should be invoked during the Shutdown LSP server lifecycle handler.

StartAsync(string, string, CancellationTokenSource, string?)

Runs a server executable with command-line arguments mapping the specified LanguageClientSettings.

public Task StartAsync(string relativePath, string pipeName, CancellationTokenSource tokenSource, string? mode = null)

Parameters

relativePath string
pipeName string
tokenSource CancellationTokenSource
mode string

The mode rdc.exe runs in, set as RDCORE_MODE in the child environment: HostMode for the environment host, ExternalMode for the external host; null for a server that is not rdc.exe.

Returns

Task

WaitForExitAsync()

Completes when the server process exits.

public Task WaitForExitAsync()

Returns

Task