initial Commit
This commit is contained in:
21
Private/Test-ConfigurationDataMapContainsKey.ps1
Normal file
21
Private/Test-ConfigurationDataMapContainsKey.ps1
Normal file
@@ -0,0 +1,21 @@
|
||||
function Test-ConfigurationDataMapContainsKey {
|
||||
[CmdletBinding()]
|
||||
Param(
|
||||
[Parameter(Mandatory=$true)]
|
||||
$Map,
|
||||
|
||||
[Parameter(Mandatory=$true)]
|
||||
[string]
|
||||
$Key
|
||||
)
|
||||
|
||||
if($Map -is [System.Collections.Hashtable]){
|
||||
return $Map.ContainsKey($Key)
|
||||
}
|
||||
|
||||
if($Map -is [System.Collections.Specialized.OrderedDictionary]){
|
||||
return $Map.Contains($Key)
|
||||
}
|
||||
|
||||
return $false
|
||||
}
|
||||
Reference in New Issue
Block a user