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