10 lines
414 B
PowerShell
10 lines
414 B
PowerShell
function Get-FunctionWriteProgressHelperCalls {
|
|
param (
|
|
[Parameter(Mandatory = $true)]
|
|
[ValidateNotNullOrEmpty()]
|
|
[string]$FunctionName
|
|
)
|
|
|
|
$commandDefinition = (Show-CommandDefinition $FunctionName)
|
|
return ([System.Management.Automation.PsParser]::Tokenize($commandDefinition, [ref]$null) | where { $_.Type -eq 'Command' -and $_.Content -eq 'Write-ProgressHelper' }).Count
|
|
} |