Rename 'Get-Subsystem' to 'Get-PSSubsystem' and fix two minor issues (#13765)

This commit is contained in:
Dongbo Wang
2020-10-14 09:42:37 -07:00
committed by GitHub
parent cf251a97d2
commit 2728574df7
4 changed files with 7 additions and 7 deletions
@@ -738,7 +738,7 @@ namespace System.Management.Automation.Runspaces
"System.Management.Automation.Subsystem.SubsystemInfo",
TableControl.Create()
.AddHeader(Alignment.Left, width: 17, label: "Kind")
.AddHeader(Alignment.Left, width: 15, label: "SubsystemType")
.AddHeader(Alignment.Left, width: 18, label: "SubsystemType")
.AddHeader(Alignment.Right, width: 12, label: "IsRegistered")
.AddHeader(Alignment.Left, label: "Implementations")
.StartRowDefinition()
@@ -5395,7 +5395,7 @@ end {
if (ExperimentalFeature.IsEnabled("PSSubsystemPluginModel"))
{
cmdlets.Add("Get-Subsystem", new SessionStateCmdletEntry("Get-Subsystem", typeof(Subsystem.GetSubsystemCommand), helpFile));
cmdlets.Add("Get-PSSubsystem", new SessionStateCmdletEntry("Get-PSSubsystem", typeof(Subsystem.GetPSSubsystemCommand), helpFile));
}
foreach (var val in cmdlets.Values)
@@ -6,12 +6,12 @@
namespace System.Management.Automation.Subsystem
{
/// <summary>
/// Implementation of 'Get-Subsystem' cmdlet.
/// Implementation of 'Get-PSSubsystem' cmdlet.
/// </summary>
[Experimental("PSSubsystemPluginModel", ExperimentAction.Show)]
[Cmdlet(VerbsCommon.Get, "Subsystem", DefaultParameterSetName = AllSet)]
[Cmdlet(VerbsCommon.Get, "PSSubsystem", DefaultParameterSetName = AllSet)]
[OutputType(typeof(SubsystemInfo))]
public sealed class GetSubsystemCommand : PSCmdlet
public sealed class GetPSSubsystemCommand : PSCmdlet
{
private const string AllSet = "GetAllSet";
private const string TypeSet = "GetByTypeSet";
@@ -37,7 +37,7 @@ namespace System.Management.Automation.Subsystem
switch (ParameterSetName)
{
case AllSet:
WriteObject(SubsystemManager.GetAllSubsystemInfo());
WriteObject(SubsystemManager.GetAllSubsystemInfo(), enumerateCollection: true);
break;
case KindSet:
WriteObject(SubsystemManager.GetSubsystemInfo(Kind));
@@ -16,7 +16,7 @@ $script:cmdletsToSkip = @(
"Get-ExperimentalFeature",
"Enable-ExperimentalFeature",
"Disable-ExperimentalFeature",
"Get-Subsystem"
"Get-PSSubsystem"
)
function UpdateHelpFromLocalContentPath {