LanguageServer Class
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
PowerFx Language server implementation
LanguageServer can receive request/notification payload from client, it can also send request/notification to client.
LanguageServer is hosted inside WebSocket or HTTP/HTTPS service
- For WebSocket, OnDataReceived() is for incoming traffic, SendToClient() is for outgoing traffic
- For HTTP/HTTPS, OnDataReceived() is for HTTP/HTTPS request, SendToClient() is queued up in next HTTP/HTTPS response.
public class LanguageServer
type LanguageServer = class
Public Class LanguageServer
- Inheritance
-
LanguageServer
NL2Fx |
If set, provides the handler for $/nlSuggestion message. |
Get |
Get the charactor position (starts with 1) from its line. e.g. "123\n1{2}3" ==> 2 ({x} is the input char at position) "12{\n}123" ==> 3 ('\n' belongs to the previous line "12\n", the last char is '2' with index of 3). |
Get |
Get the position offset (starts with 0) in Expression from line/character (starts with 0) e.g. "123", line:0, char:1 => 1. |
Get |
Construct a Range based on a Span for a given expression. |
On |
Received request/notification payload from client. |
Log |
Callback for host to get notified of unhandled exceptions that are happening asynchronously. This should be used for logging purposes. |
On |
Product | Versions |
---|---|
Power Fx SDK | Latest |