mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Rename 'Get-Subsystem' to 'Get-PSSubsystem' and fix two minor issues (#13765)
This commit is contained in:
+1
-1
@@ -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)
|
||||
|
||||
+4
-4
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user