Click or drag to resize
LanguageServer Class
A Visual Studio Code language server implementation.
Inheritance Hierarchy
SystemObject
  VSCodeLanguageServer

Namespace: VSCode
Assembly: VSCode (in VSCode.dll) Version: 1.0.0
Syntax
C#
public class LanguageServer : IDisposable

The LanguageServer type exposes the following members.

Constructors
  NameDescription
Public methodLanguageServer
Initializes a new instance of the LanguageServer class
Public methodLanguageServer(ServerCapabilities)
Initializes a new instance of the LanguageServer class
Top
Properties
  NameDescription
Public propertyEditor
Public propertyState
Top
Methods
  NameDescription
Public methodDispose
Releases all resources used by the LanguageServer
Public methodGetFeatureT
Public methodSendNotification(String)
Sends a notification message to the client.
Public methodSendNotification(String, Object)
Sends a notification message to the client.
Public methodSendRequestAsync(String)
Sends a request message to the client and awaits a response.
Public methodSendRequestAsync(String, Object)
Sends a request message to the client and awaits a response.
Public methodSendResponseAsync(Int32, Object)
Sends a response to the client using the provided ID and result.
Public methodSendResponseAsync(Int32, Object, Object)
Sends a response to the client using the provided ID, result, and error.
Public methodStart
Starts the language server (enables sending and receiving messages).
Public methodStop
Stops the language server.
Public methodWaitForState(LanguageServerState)
Public methodWaitForState(LanguageServerState, TimeSpan)
Top
Events
  NameDescription
Public eventExit
Public eventInitialize
Public eventNotificationReceived
An event fired when notifications are received from the client.
Public eventRequestReceived
An event fired when requests are received from the client.
Public eventResponseReceived
An event fired when responses are received from the client. The
SendRequestAsync()
method should be used instead of listening to this event when sending normal requests.
Top
Extension Methods
  NameDescription
Public Extension MethodToJObject
Converts this instance to a JObject.
(Defined by ObjectExtensions.)
Top
Examples
C#
using (LanguageServer server = new LanguageServer())
{
    server.Start();
    server.Editor.ShowMessage(MessageType.Info, "Hello from .NET!");
}
See Also