Commit 6cda35e1 by Matt Martz

Use more simple check for existence of member

parent 14dab987
......@@ -7,7 +7,7 @@ If ($args.Length -gt 0)
}
$data = 'pong';
If (($params | Get-Member | Select-Object -ExpandProperty Name) -contains 'data')
If ($params.data.GetType)
{
$data = $params.data;
}
......
......@@ -8,13 +8,13 @@ If ($args.Length -gt 0)
}
$src = '';
If (($params | Get-Member | Select-Object -ExpandProperty Name) -contains 'src')
If ($params.src.GetType)
{
$src = $params.src;
}
Else
{
If (($params | Get-Member | Select-Object -ExpandProperty Name) -contains 'path')
If ($params.path.GetType)
{
$src = $params.path;
}
......
......@@ -8,13 +8,13 @@ If ($args.Length -gt 0)
}
$path = '';
If (($params | Get-Member | Select-Object -ExpandProperty Name) -contains 'path')
If ($params.path.GetType)
{
$path = $params.path;
}
$get_md5 = $TRUE;
If (($params | Get-Member | Select-Object -ExpandProperty Name) -contains 'get_md5')
If ($params.get_md5.GetType)
{
$get_md5 = $params.get_md5;
}
......
......@@ -7,7 +7,7 @@ If ($args.Length -gt 0)
}
$data = 'pong';
If (($params | Get-Member | Select-Object -ExpandProperty Name) -contains 'data')
If ($params.data.GetType)
{
$data = $params.data;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment