-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8720aec
commit defc029
Showing
2 changed files
with
24 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,32 @@ | ||
Public Class LanguageServer | ||
Imports System.Reflection | ||
Imports Flute.Http | ||
Imports Flute.Http.Core | ||
Imports Flute.Http.Core.Message | ||
Imports Flute.Http.FileSystem | ||
Imports Microsoft.VisualBasic.ApplicationServices | ||
|
||
Public Class LanguageServer : Implements IAppHandler | ||
|
||
ReadOnly vscode As FileSystem | ||
ReadOnly http As HttpSocket | ||
|
||
Sub New(port As Integer) | ||
Sub New(port As Integer, Optional vscode_clr As String = Nothing) | ||
If vscode_clr.FileExists(ZERO_Nonexists:=True) Then | ||
vscode = New FileSystem(FindResource(Assembly.LoadFrom(vscode_clr.GetFullPath))) | ||
End If | ||
|
||
http = New HttpDriver().HttpMethod("get", Me).GetSocket(port) | ||
End Sub | ||
|
||
Public Sub Listen() | ||
Private Shared Function FindResource(asm As Assembly) As IFileSystemEnvironment | ||
|
||
End Function | ||
|
||
Private Sub AppHandler(request As HttpRequest, response As HttpResponse) Implements IAppHandler.AppHandler | ||
|
||
End Sub | ||
|
||
Public Sub Listen() | ||
Call http.Run() | ||
End Sub | ||
End Class |