55
66using Microsoft . PowerShell . EditorServices . Console ;
77using Microsoft . PowerShell . EditorServices . Extensions ;
8+ using Microsoft . PowerShell . EditorServices . Protocol ;
9+ using Microsoft . PowerShell . EditorServices . Protocol . MessageProtocol ;
810using Microsoft . PowerShell . EditorServices . Session ;
911using Microsoft . PowerShell . EditorServices . Templates ;
1012using Microsoft . PowerShell . EditorServices . Utility ;
@@ -77,12 +79,14 @@ public class EditorSession
7779 /// </summary>
7880 public bool UsesConsoleHost { get ; private set ; }
7981
82+ public IMessageDispatcher MessageDispatcher { get ; private set ; }
83+
8084 #endregion
8185
8286 #region Constructors
8387
8488 /// <summary>
85- ///
89+ ///
8690 /// </summary>
8791 /// <param name="logger">An ILogger implementation used for writing log messages.</param>
8892 public EditorSession ( ILogger logger )
@@ -109,6 +113,8 @@ public void StartSession(
109113 this . ConsoleService = consoleService ;
110114 this . UsesConsoleHost = this . ConsoleService . EnableConsoleRepl ;
111115
116+ // Initialize all services
117+ this . MessageDispatcher = new MessageDispatcher ( this . logger ) ;
112118 this . LanguageService = new LanguageService ( this . PowerShellContext , this . logger ) ;
113119 this . ExtensionService = new ExtensionService ( this . PowerShellContext ) ;
114120 this . TemplateService = new TemplateService ( this . PowerShellContext , this . logger ) ;
@@ -137,6 +143,8 @@ public void StartDebugSession(
137143 this . PowerShellContext = powerShellContext ;
138144 this . ConsoleService = consoleService ;
139145
146+ // Initialize all services
147+ this . MessageDispatcher = new MessageDispatcher ( this . logger ) ;
140148 this . RemoteFileManager = new RemoteFileManager ( this . PowerShellContext , editorOperations , logger ) ;
141149 this . DebugService = new DebugService ( this . PowerShellContext , this . RemoteFileManager , logger ) ;
142150
0 commit comments