initial Commit
This commit is contained in:
20
Private/Assert-ConfigurationDataExpressionArgumentCount.ps1
Normal file
20
Private/Assert-ConfigurationDataExpressionArgumentCount.ps1
Normal file
@@ -0,0 +1,20 @@
|
||||
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)]."
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user