@@ -56,31 +56,30 @@ public class EditorServicesHost
56
56
{
57
57
#region Private Fields
58
58
59
- private ILogger logger ;
60
- private bool enableConsoleRepl ;
61
- private HostDetails hostDetails ;
62
- private ProfilePaths profilePaths ;
59
+ private string [ ] additionalModules ;
63
60
private string bundledModulesPath ;
64
61
private DebugAdapter debugAdapter ;
65
- private string [ ] additionalModules ;
66
62
private EditorSession editorSession ;
63
+ private bool enableConsoleRepl ;
67
64
private HashSet < string > featureFlags ;
65
+ private HostDetails hostDetails ;
68
66
private LanguageServer languageServer ;
67
+ private ILogger logger ;
68
+ private ProfilePaths profilePaths ;
69
+ private TaskCompletionSource < bool > serverCompletedTask ;
69
70
70
71
private IServerListener languageServiceListener ;
71
72
private IServerListener debugServiceListener ;
72
73
73
- private TaskCompletionSource < bool > serverCompletedTask ;
74
-
75
74
#endregion
76
75
77
76
#region Properties
78
77
79
- public EditorServicesHostStatus Status { get ; private set ; }
78
+ public int DebugServicePort { get ; private set ; }
80
79
81
80
public int LanguageServicePort { get ; private set ; }
82
81
83
- public int DebugServicePort { get ; private set ; }
82
+ public EditorServicesHostStatus Status { get ; private set ; }
84
83
85
84
#endregion
86
85
@@ -108,6 +107,7 @@ public EditorServicesHost(
108
107
this . bundledModulesPath = bundledModulesPath ;
109
108
this . additionalModules = additionalModules ?? new string [ 0 ] ;
110
109
this . featureFlags = new HashSet < string > ( featureFlags ?? new string [ 0 ] ) ;
110
+ this . serverCompletedTask = new TaskCompletionSource < bool > ( ) ;
111
111
112
112
#if DEBUG
113
113
if ( waitForDebugger )
@@ -226,6 +226,7 @@ private async void OnLanguageServiceClientConnect(
226
226
this . editorSession ,
227
227
messageDispatcher ,
228
228
protocolEndpoint ,
229
+ this . serverCompletedTask ,
229
230
this . logger ) ;
230
231
231
232
await this . editorSession . PowerShellContext . ImportCommandsModule (
@@ -348,7 +349,6 @@ public void StopServices()
348
349
public void WaitForCompletion ( )
349
350
{
350
351
// TODO: We need a way to know when to complete this task!
351
- this . serverCompletedTask = new TaskCompletionSource < bool > ( ) ;
352
352
this . serverCompletedTask . Task . Wait ( ) ;
353
353
}
354
354
@@ -479,4 +479,4 @@ private IServerListener CreateServiceListener(MessageProtocolType protocol, Edit
479
479
480
480
#endregion
481
481
}
482
- }
482
+ }
0 commit comments