@@ -2141,6 +2141,40 @@ return $false
2141
2141
})
2142
2142
</GetScriptBlock >
2143
2143
</ScriptProperty >
2144
+ <ScriptProperty >
2145
+ <Name >ByInputType</Name >
2146
+ <GetScriptBlock >
2147
+ < #
2148
+ .SYNOPSIS
2149
+ Gets Language Functions by Input Type
2150
+ .DESCRIPTION
2151
+ Returns a dictionary of all unique language functions that accept a pipeline parameter.
2152
+
2153
+ The key will be the type of parameter accepted.
2154
+ The value will be a list of commands that accept that parameter from the pipeline.
2155
+ .NOTES
2156
+ Primitive parameter types and string types will be ignored.
2157
+ #>
2158
+ param()
2159
+ # We want the results to be ordered (both the keys and the values)
2160
+ $byInputType = [Ordered]@{}
2161
+ $uniqueList = @($this.Unique | Sort-Object Order)
2162
+ foreach ($uniqueCommand in $uniqueList) {
2163
+ , @(foreach ($parameterSet in $uniqueCommand.ParameterSets) {
2164
+ foreach ($parameterInSet in $parameterSet.Parameters) {
2165
+ if (-not $parameterInSet.ValueFromPipeline) { continue }
2166
+ if ($parameterInSet.ParameterType.IsPrimitive) { continue }
2167
+ if ($parameterInSet.ParameterType -eq [string]) { continue }
2168
+ if (-not $byInputType[$parameterInSet.ParameterType]) {
2169
+ $byInputType[$parameterInSet.ParameterType] = [Collections.Generic.List[PSObject]]::new()
2170
+ }
2171
+ $byInputType[$parameterInSet.ParameterType].Add($uniqueCommand)
2172
+ }
2173
+ })
2174
+ }
2175
+ $byInputType
2176
+ </GetScriptBlock >
2177
+ </ScriptProperty >
2144
2178
<ScriptProperty >
2145
2179
<Name >Count</Name >
2146
2180
<GetScriptBlock >
@@ -2209,6 +2243,40 @@ $distinctCommands = @{}
2209
2243
})
2210
2244
</GetScriptBlock >
2211
2245
</ScriptProperty >
2246
+ <ScriptProperty >
2247
+ <Name >ByInputType</Name >
2248
+ <GetScriptBlock >
2249
+ < #
2250
+ .SYNOPSIS
2251
+ Gets Language Templates by Input Type
2252
+ .DESCRIPTION
2253
+ Returns a dictionary of all unique language templates that accept a pipeline parameter.
2254
+
2255
+ The key will be the type of parameter accepted.
2256
+ The value will be a list of commands that accept that parameter from the pipeline.
2257
+ .NOTES
2258
+ Primitive parameter types and string types will be ignored.
2259
+ #>
2260
+ param()
2261
+ # We want the results to be ordered (both the keys and the values)
2262
+ $byInputType = [Ordered]@{}
2263
+ $uniqueList = @($this.Unique | Sort-Object Order)
2264
+ foreach ($uniqueCommand in $uniqueList) {
2265
+ , @(foreach ($parameterSet in $uniqueCommand.ParameterSets) {
2266
+ foreach ($parameterInSet in $parameterSet.Parameters) {
2267
+ if (-not $parameterInSet.ValueFromPipeline) { continue }
2268
+ if ($parameterInSet.ParameterType.IsPrimitive) { continue }
2269
+ if ($parameterInSet.ParameterType -eq [string]) { continue }
2270
+ if (-not $byInputType[$parameterInSet.ParameterType]) {
2271
+ $byInputType[$parameterInSet.ParameterType] = [Collections.Generic.List[PSObject]]::new()
2272
+ }
2273
+ $byInputType[$parameterInSet.ParameterType].Add($uniqueCommand)
2274
+ }
2275
+ })
2276
+ }
2277
+ $byInputType
2278
+ </GetScriptBlock >
2279
+ </ScriptProperty >
2212
2280
<ScriptProperty >
2213
2281
<Name >Count</Name >
2214
2282
<GetScriptBlock >
0 commit comments