5
5
6
6
using Microsoft . PowerShell . EditorServices . Console ;
7
7
using Microsoft . PowerShell . EditorServices . Extensions ;
8
+ using Microsoft . PowerShell . EditorServices . Protocol ;
9
+ using Microsoft . PowerShell . EditorServices . Protocol . MessageProtocol ;
8
10
using Microsoft . PowerShell . EditorServices . Session ;
9
11
using Microsoft . PowerShell . EditorServices . Templates ;
10
12
using Microsoft . PowerShell . EditorServices . Utility ;
@@ -77,12 +79,14 @@ public class EditorSession
77
79
/// </summary>
78
80
public bool UsesConsoleHost { get ; private set ; }
79
81
82
+ public IMessageDispatcher MessageDispatcher { get ; private set ; }
83
+
80
84
#endregion
81
85
82
86
#region Constructors
83
87
84
88
/// <summary>
85
- ///
89
+ ///
86
90
/// </summary>
87
91
/// <param name="logger">An ILogger implementation used for writing log messages.</param>
88
92
public EditorSession ( ILogger logger )
@@ -109,6 +113,8 @@ public void StartSession(
109
113
this . ConsoleService = consoleService ;
110
114
this . UsesConsoleHost = this . ConsoleService . EnableConsoleRepl ;
111
115
116
+ // Initialize all services
117
+ this . MessageDispatcher = new MessageDispatcher ( this . logger ) ;
112
118
this . LanguageService = new LanguageService ( this . PowerShellContext , this . logger ) ;
113
119
this . ExtensionService = new ExtensionService ( this . PowerShellContext ) ;
114
120
this . TemplateService = new TemplateService ( this . PowerShellContext , this . logger ) ;
@@ -137,6 +143,8 @@ public void StartDebugSession(
137
143
this . PowerShellContext = powerShellContext ;
138
144
this . ConsoleService = consoleService ;
139
145
146
+ // Initialize all services
147
+ this . MessageDispatcher = new MessageDispatcher ( this . logger ) ;
140
148
this . RemoteFileManager = new RemoteFileManager ( this . PowerShellContext , editorOperations , logger ) ;
141
149
this . DebugService = new DebugService ( this . PowerShellContext , this . RemoteFileManager , logger ) ;
142
150
0 commit comments