21 lines
447 B
PowerShell
21 lines
447 B
PowerShell
function Assert-ConfigurationDataExpressionArgumentCount {
|
|
[CmdletBinding()]
|
|
Param(
|
|
[Parameter(Mandatory=$true)]
|
|
[string]
|
|
$Name,
|
|
|
|
[AllowNull()]
|
|
[object[]]
|
|
$Arguments,
|
|
|
|
[Parameter(Mandatory=$true)]
|
|
[int]
|
|
$Count
|
|
)
|
|
|
|
if(@($Arguments).Count -ne $Count){
|
|
throw "Function [$Name] expects [$Count] argument(s), but received [$(@($Arguments).Count)]."
|
|
}
|
|
}
|