Skip to content

Commit b6b5876

Browse files
author
James Brundage
committed
Updating PipeScript.types.ps1xml
1 parent ee4caa7 commit b6b5876

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

PipeScript.types.ps1xml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1000,7 +1000,25 @@ return $false
10001000
<ScriptProperty>
10011001
<Name>FromUnbound</Name>
10021002
<GetScriptBlock>
1003-
</GetScriptBlock>
1003+
foreach ($attr in $this.Attributes) {
1004+
$reflectedType = $attr.TypeName.GetReflectionType()
1005+
if ($reflectedType -ne [Management.Automation.ParameterAttribute]) {
1006+
continue
1007+
}
1008+
foreach ($namedArgument in $attr.NamedArguments) {
1009+
if ($namedArgument.ArgumentName -ne 'ValueFromRemainingArguments') {
1010+
continue
1011+
}
1012+
if ($namedArgument.Argument -and $namedArgument.Argument.Value) {
1013+
return $true
1014+
} elseif (-not $namedArgument.Argument) {
1015+
return $true
1016+
}
1017+
}
1018+
}
1019+
1020+
return $false
1021+
</GetScriptBlock>
10041022
</ScriptProperty>
10051023
<ScriptProperty>
10061024
<Name>Help</Name>

0 commit comments

Comments
 (0)