Skip to content

Commit e423f0e

Browse files
nianderMiYanni
andauthored
Update CmdletExtensions.cs
Co-Authored-By: Michael Yanni <[email protected]>
1 parent 402fccf commit e423f0e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Common/Extensions/CmdletExtensions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ public static List<T> ExecuteScript<T>(this PSCmdlet cmdlet, string contents)
359359
public static bool IsParameterBound<TPSCmdlet, TProp>(this TPSCmdlet cmdlet, Expression<Func<TPSCmdlet, TProp>> propertySelector) where TPSCmdlet : PSCmdlet
360360
{
361361
var propName = ((MemberExpression)propertySelector.Body).Member.Name;
362-
return cmdlet.MyInvocation?.BoundParameters.ContainsKey(propName) ?? false;
362+
return cmdlet.IsBound(propName);
363363
}
364364

365365
#region PowerShell Commands

0 commit comments

Comments
 (0)