-
Notifications
You must be signed in to change notification settings - Fork 234
Code cleanup of the start script and ESHost.cs file #796
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,8 +45,11 @@ public class EditorServiceTransportConfig | |
/// For NamedPipe it's the pipe name. | ||
/// </summary> | ||
public string InOutPipeName { get; set; } | ||
|
||
public string OutPipeName { get; set; } | ||
|
||
public string InPipeName { get; set; } | ||
|
||
internal string Endpoint => OutPipeName != null && InPipeName != null ? $"In pipe: {InPipeName} Out pipe: {OutPipeName}" : $" InOut pipe: {InOutPipeName}"; | ||
} | ||
|
||
|
@@ -243,7 +246,7 @@ await this.editorSession.PowerShellContext.ImportCommandsModule( | |
foreach (string module in this.additionalModules) | ||
{ | ||
await this.editorSession.PowerShellContext.ExecuteCommand<System.Management.Automation.PSObject>( | ||
new System.Management.Automation.PSCommand().AddCommand("Import-Module").AddArgument(module), | ||
new System.Management.Automation.PSCommand().AddCommand("Microsoft.PowerShell.Core\\Import-Module").AddArgument(module), | ||
false, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe a good time to label these arguments too? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You mean There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, I meant the |
||
true); | ||
} | ||
|
@@ -455,6 +458,7 @@ private void CurrentDomain_UnhandledException( | |
e.ExceptionObject.ToString())); | ||
} | ||
#endif | ||
|
||
private IServerListener CreateServiceListener(MessageProtocolType protocol, EditorServiceTransportConfig config) | ||
{ | ||
switch (config.TransportType) | ||
|
@@ -466,7 +470,7 @@ private IServerListener CreateServiceListener(MessageProtocolType protocol, Edit | |
|
||
case EditorServiceTransportType.NamedPipe: | ||
{ | ||
if (config.OutPipeName !=null && config.InPipeName !=null) | ||
if ((config.OutPipeName != null) && (config.InPipeName != null)) | ||
{ | ||
this.logger.Write(LogLevel.Verbose, $"Creating NamedPipeServerListener for ${protocol} protocol with two pipes: In: '{config.InPipeName}'. Out: '{config.OutPipeName}'"); | ||
return new NamedPipeServerListener(protocol, config.InPipeName, config.OutPipeName, this.logger); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So much nicer!