Class AnyTextJsonRpcServerUtil
Helper class to configure Stream JSON RPC for the usage with the LSP implementation
public static class AnyTextJsonRpcServerUtil
- Inheritance
-
AnyTextJsonRpcServerUtil
- Inherited Members
Methods
AddLocalRpcTarget(JsonRpc, ILspServer)
Registers an ILspServer implementation as a local RPC target on the specified JsonRpc instance.
public static void AddLocalRpcTarget(JsonRpc rpc, ILspServer server)
Parameters
rpc
JsonRpcThe JsonRpc instance that will handle incoming RPC calls.
server
ILspServerThe ILspServer implementation to be registered as the local target.
CreateServer(IDuplexPipe, ILspServer)
Creates a StreamJSON RPC object for the given transport
public static JsonRpc CreateServer(IDuplexPipe pipe, ILspServer server)
Parameters
pipe
IDuplexPipeThe pipe used for the connection
server
ILspServerThe server implementation
Returns
- JsonRpc
A JSON RPC object that manages the connection to the client
CreateServer(Stream)
Creates a StreamJSON RPC object for the given transport without localRpcTarget
public static JsonRpc CreateServer(Stream stream)
Parameters
stream
StreamThe stream that represents the connection with the client
Returns
- JsonRpc
A JSON RPC object that manages the connection to the client
CreateServer(Stream, ILspServer)
Creates a StreamJSON RPC object for the given transport
public static JsonRpc CreateServer(Stream stream, ILspServer server)
Parameters
stream
StreamThe stream that represents the connection with the client
server
ILspServerThe server implementation
Returns
- JsonRpc
A JSON RPC object that manages the connection to the client
CreateServer(WebSocket, ILspServer)
Creates a StreamJSON RPC object for the given transport
public static JsonRpc CreateServer(WebSocket webSocket, ILspServer server)
Parameters
webSocket
WebSocketThe websocket connection
server
ILspServerThe server implementation
Returns
- JsonRpc
A JSON RPC object that manages the connection to the client
CreateTraceSource(SourceLevels)
Creates and configures a TraceSource instance for logging trace information.
public static TraceSource CreateTraceSource(SourceLevels sourceLevels = (SourceLevels)-1)
Parameters
sourceLevels
SourceLevelsThe SourceLevel used to filter messages by type and severity. Defaults to All.
Returns
- TraceSource
A TraceSource instance configured for the specified logging level.