19 lines
422 B
PowerShell
19 lines
422 B
PowerShell
function Test-ConfigurationDataDictionaryKey {
|
|
[CmdletBinding()]
|
|
Param(
|
|
[Parameter(Mandatory=$true)]
|
|
[System.Collections.IDictionary]
|
|
$Dictionary,
|
|
|
|
[Parameter(Mandatory=$true)]
|
|
[string]
|
|
$Key
|
|
)
|
|
|
|
if($Dictionary -is [System.Collections.Specialized.OrderedDictionary]){
|
|
return $Dictionary.Contains($Key)
|
|
}
|
|
|
|
return $Dictionary.ContainsKey($Key)
|
|
}
|