@@ -8,15 +8,12 @@ if ($PSEdition -eq 'Desktop') {
8
8
Microsoft.PowerShell.Utility\Add-Type - Path " $PSScriptRoot /bin/Desktop/System.IO.Pipes.AccessControl.dll"
9
9
Microsoft.PowerShell.Utility\Add-Type - Path " $PSScriptRoot /bin/Desktop/System.Security.AccessControl.dll"
10
10
Microsoft.PowerShell.Utility\Add-Type - Path " $PSScriptRoot /bin/Desktop/System.Security.Principal.Windows.dll"
11
- } elseif ($PSVersionTable.PSVersion -ge ' 6.0' -and $PSVersionTable.PSVersion -lt ' 6.1' -and $IsWindows ) {
12
- Microsoft.PowerShell.Utility\Add-Type - Path " $PSScriptRoot /bin/6.0/System.IO.Pipes.AccessControl.dll"
13
- Microsoft.PowerShell.Utility\Add-Type - Path " $PSScriptRoot /bin/6.0/System.Security.AccessControl.dll"
14
- Microsoft.PowerShell.Utility\Add-Type - Path " $PSScriptRoot /bin/6.0/System.Security.Principal.Windows.dll"
15
11
}
16
12
17
13
Microsoft.PowerShell.Utility\Add-Type - Path " $PSScriptRoot /bin/Microsoft.PowerShell.EditorServices.dll"
18
14
Microsoft.PowerShell.Utility\Add-Type - Path " $PSScriptRoot /bin/Microsoft.PowerShell.EditorServices.Host.dll"
19
15
Microsoft.PowerShell.Utility\Add-Type - Path " $PSScriptRoot /bin/Microsoft.PowerShell.EditorServices.Protocol.dll"
16
+ Microsoft.PowerShell.Utility\Add-Type - Path " $PSScriptRoot /bin/Microsoft.PowerShell.EditorServices.Engine.dll"
20
17
21
18
function Start-EditorServicesHost {
22
19
[CmdletBinding ()]
@@ -97,13 +94,13 @@ function Start-EditorServicesHost {
97
94
98
95
$editorServicesHost = $null
99
96
$hostDetails =
100
- Microsoft.PowerShell.Utility\New-Object Microsoft.PowerShell.EditorServices.Session .HostDetails @ (
97
+ Microsoft.PowerShell.Utility\New-Object Microsoft.PowerShell.EditorServices.Engine .HostDetails @ (
101
98
$HostName ,
102
99
$HostProfileId ,
103
100
(Microsoft.PowerShell.Utility\New-Object System.Version @ ($HostVersion )))
104
101
105
102
$editorServicesHost =
106
- Microsoft.PowerShell.Utility\New-Object Microsoft.PowerShell.EditorServices.Host .EditorServicesHost @ (
103
+ Microsoft.PowerShell.Utility\New-Object Microsoft.PowerShell.EditorServices.Engine .EditorServicesHost @ (
107
104
$hostDetails ,
108
105
$BundledModulesPath ,
109
106
$EnableConsoleRepl.IsPresent ,
@@ -114,40 +111,40 @@ function Start-EditorServicesHost {
114
111
115
112
# Build the profile paths using the root paths of the current $profile variable
116
113
$profilePaths =
117
- Microsoft.PowerShell.Utility\New-Object Microsoft.PowerShell.EditorServices.Session .ProfilePaths @ (
114
+ Microsoft.PowerShell.Utility\New-Object Microsoft.PowerShell.EditorServices.Engine .ProfilePaths @ (
118
115
$hostDetails.ProfileId ,
119
116
[System.IO.Path ]::GetDirectoryName($profile.AllUsersAllHosts ),
120
117
[System.IO.Path ]::GetDirectoryName($profile.CurrentUserAllHosts ))
121
118
122
119
$editorServicesHost.StartLogging ($LogPath , $LogLevel );
123
120
124
121
$languageServiceConfig =
125
- Microsoft.PowerShell.Utility\New-Object Microsoft.PowerShell.EditorServices.Host .EditorServiceTransportConfig
122
+ Microsoft.PowerShell.Utility\New-Object Microsoft.PowerShell.EditorServices.Engine .EditorServiceTransportConfig
126
123
127
124
$debugServiceConfig =
128
- Microsoft.PowerShell.Utility\New-Object Microsoft.PowerShell.EditorServices.Host .EditorServiceTransportConfig
125
+ Microsoft.PowerShell.Utility\New-Object Microsoft.PowerShell.EditorServices.Engine .EditorServiceTransportConfig
129
126
130
127
switch ($PSCmdlet.ParameterSetName ) {
131
128
" Stdio" {
132
- $languageServiceConfig.TransportType = [Microsoft.PowerShell.EditorServices.Host .EditorServiceTransportType ]::Stdio
133
- $debugServiceConfig.TransportType = [Microsoft.PowerShell.EditorServices.Host .EditorServiceTransportType ]::Stdio
129
+ $languageServiceConfig.TransportType = [Microsoft.PowerShell.EditorServices.Engine .EditorServiceTransportType ]::Stdio
130
+ $debugServiceConfig.TransportType = [Microsoft.PowerShell.EditorServices.Engine .EditorServiceTransportType ]::Stdio
134
131
break
135
132
}
136
133
" NamedPipe" {
137
- $languageServiceConfig.TransportType = [Microsoft.PowerShell.EditorServices.Host .EditorServiceTransportType ]::NamedPipe
134
+ $languageServiceConfig.TransportType = [Microsoft.PowerShell.EditorServices.Engine .EditorServiceTransportType ]::NamedPipe
138
135
$languageServiceConfig.InOutPipeName = " $LanguageServiceNamedPipe "
139
136
if ($DebugServiceNamedPipe ) {
140
- $debugServiceConfig.TransportType = [Microsoft.PowerShell.EditorServices.Host .EditorServiceTransportType ]::NamedPipe
137
+ $debugServiceConfig.TransportType = [Microsoft.PowerShell.EditorServices.Engine .EditorServiceTransportType ]::NamedPipe
141
138
$debugServiceConfig.InOutPipeName = " $DebugServiceNamedPipe "
142
139
}
143
140
break
144
141
}
145
142
" NamedPipeSimplex" {
146
- $languageServiceConfig.TransportType = [Microsoft.PowerShell.EditorServices.Host .EditorServiceTransportType ]::NamedPipe
143
+ $languageServiceConfig.TransportType = [Microsoft.PowerShell.EditorServices.Engine .EditorServiceTransportType ]::NamedPipe
147
144
$languageServiceConfig.InPipeName = $LanguageServiceInNamedPipe
148
145
$languageServiceConfig.OutPipeName = $LanguageServiceOutNamedPipe
149
146
if ($DebugServiceInNamedPipe -and $DebugServiceOutNamedPipe ) {
150
- $debugServiceConfig.TransportType = [Microsoft.PowerShell.EditorServices.Host .EditorServiceTransportType ]::NamedPipe
147
+ $debugServiceConfig.TransportType = [Microsoft.PowerShell.EditorServices.Engine .EditorServiceTransportType ]::NamedPipe
151
148
$debugServiceConfig.InPipeName = $DebugServiceInNamedPipe
152
149
$debugServiceConfig.OutPipeName = $DebugServiceOutNamedPipe
153
150
}
0 commit comments