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
rpcJsonRpcThe JsonRpc instance that will handle incoming RPC calls.
serverILspServerThe 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
pipeIDuplexPipeThe pipe used for the connection
serverILspServerThe 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
streamStreamThe 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
streamStreamThe stream that represents the connection with the client
serverILspServerThe 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
webSocketWebSocketThe websocket connection
serverILspServerThe 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
sourceLevelsSourceLevelsThe SourceLevel used to filter messages by type and severity. Defaults to All.
Returns
- TraceSource
A TraceSource instance configured for the specified logging level.