Use more simple check for existence of member

reviewable/pr18780/r1
Matt Martz 11 years ago
parent fb43772429
commit 3b5c568b10

@ -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;
}

Loading…
Cancel
Save