Class PlatformClientCapabilitiesService
Remembers what the connected client asked this server for in the
rdcore/platform/initialize handshake, so handlers can act on it.
public sealed class PlatformClientCapabilitiesService : IPlatformClientCapabilitiesService
- Inheritance
-
PlatformClientCapabilitiesService
- Implements
- Inherited Members
Remarks
The handshake has always been two-way on the wire — the caller sends Expected, the callee answers with what it provides — but only the answer was ever used. A server that serves optional, client-driven request families (an interactive shell's, say) needs the question too: a request for something the client never advertised is a client bug, and refusing it is how the client finds out. Every RDCore server gets one of these; whether it consults it is the server's own business.
Properties
Expected
The capabilities the connected client expects this server to provide.
public CorePlatformClientCapabilities Expected { get; }
Property Value
ExpectedComponent
The component the connected client believes it is talking to, or null before the handshake.
public CoreServerComponent? ExpectedComponent { get; }
Property Value
IsHandshakeCompleted
Whether the platform handshake has completed. Every other member reports the neutral "nothing expected" answer until it has.
public bool IsHandshakeCompleted { get; }
Property Value
Methods
Expects(Func<LanguageServerCapabilities, CorePlatformClientCapability>)
Whether the connected client expects a specific language-server capability.
public bool Expects(Func<LanguageServerCapabilities, CorePlatformClientCapability> capability)
Parameters
capabilityFunc<LanguageServerCapabilities, CorePlatformClientCapability>Selects the capability from the language-server group, e.g.
group => group.SessionStatus.
Returns
- bool
falsebefore the handshake, when the client sent no language-server expectations at all, or when it sent that capability as unsupported.
Record(PlatformInitializeParams)
Records the handshake request. Called by PlatformInitializeHandler; a later handshake
on the same connection replaces the earlier one.
public void Record(PlatformInitializeParams request)
Parameters
requestPlatformInitializeParamsThe handshake request as received.