Skip to content

Conversation

@rkeithhill
Copy link
Contributor

@rkeithhill rkeithhill commented Nov 23, 2018

Address some PSSA warnings, version guard access to $Is<platform> vars,
rename Test-NamedPipeName-OrCreate-IfNull to Get-ValidatedNamedPipeName.
Not 100% sold on the new name so open to suggestions.

Address some PSSA warnings, version guard access to $Is<platforms> vars, rename Test-NamedPipeName-OrCreate-IfNull to Get-ValidatedNamedPipeName. Not 100% sold on the new name so open to suggestions.
Copy link
Member

@TylerLeonhardt TylerLeonhardt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Just a couple comments. Thanks for the clean up, Keith!

Copy link
Contributor

@rjmholt rjmholt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much improved! Thanks @rkeithhill!

Log $OutputEncoding

function Test-NamedPipeName-OrCreate-IfNull {
function Get-ValidatedNamedPipeName {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So much nicer!

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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a good time to label these arguments too?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean .AddCommand("Microsoft.PowerShell.Core\\Import-Module").AddParameter("Name", module),? If so, yeah, makes senses to me.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I meant the true and false in C#. But I'm in favour of all of it :)

Copy link
Collaborator

@SeeminglyScience SeeminglyScience left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@rkeithhill rkeithhill merged commit f93653b into master Nov 25, 2018
@rkeithhill rkeithhill deleted the rkeithhill/start-pses-cleanup branch November 25, 2018 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

5 participants