Private/Test-EFPropertyPresent.ps1
|
function Test-EFPropertyPresent { [CmdletBinding()] param( [AllowNull()] [Parameter(Mandatory)] [object]$InputObject, [Parameter(Mandatory)] [string]$Name ) if ($null -eq $InputObject) { return $false } if ($InputObject -is [Collections.IDictionary]) { return $InputObject.Contains($Name) } return $null -ne $InputObject.PSObject.Properties[$Name] } |