-
Notifications
You must be signed in to change notification settings - Fork 158
Closed
Labels
Issue-EnhancementIssue is more of a feature request than a bugIssue is more of a feature request than a bugResolution-FixedThe issue is fixed.The issue is fixed.
Milestone
Description
Summary of the new feature / enhancement
During initial design work with Jim we decided that we should remove the []
from type names in the INPUTS and OUTPUTS section of CommandHelp. See the following code.
platyPS/src/Transform/TransformBase.cs
Lines 99 to 110 in 33b90b4
// We don't want to return any arrays, so trim the last "[]" if it is found; | |
// We can also simplify the string if desired. | |
private string GetAdjustedTypename(Type t, bool simplify = false) | |
{ | |
string tName = simplify ? LanguagePrimitives.ConvertTo<string>(t) : t.FullName; | |
if (tName.EndsWith("[]")) | |
{ | |
tName = FixUpTypeName(tName); | |
} | |
return tName; | |
} |
Proposed technical implementation details (optional)
Remove the code that removes the []
from the type name.
After further review of existing content, there are cases where it can be important to distinguish between input that can take a collection and also take a singleton on a different parameter. For example, Find-Script
has 4 parameters that can take pipeline input for string values.
(gcm Find-Script).Parameters.Values | where {$_.Name -match 'Name|Version$'} | select name,parametertype
Name ParameterType
---- -------------
Name System.String[]
MinimumVersion System.String
MaximumVersion System.String
RequiredVersion System.String
Metadata
Metadata
Assignees
Labels
Issue-EnhancementIssue is more of a feature request than a bugIssue is more of a feature request than a bugResolution-FixedThe issue is fixed.The issue is fixed.