initial Commit

This commit is contained in:
Torsten Brendgen
2026-06-27 00:36:04 +02:00
commit 4b83abc7f2
27 changed files with 1702 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
function Split-ConfigurationDataExpressionArguments {
[CmdletBinding()]
Param(
[AllowNull()]
[string]
$ArgumentText
)
if([string]::IsNullOrWhiteSpace($ArgumentText)){
return @()
}
$Arguments = @()
$Current = New-Object -TypeName System.Text.StringBuilder
$Depth = 0
$InString = $false
for($Index = 0; $Index -lt $ArgumentText.Length; $Index++){
$Character = $ArgumentText[$Index]
if($Character -eq "'"){
[void]$Current.Append($Character)
$InString = -not $InString
continue
}
if(-not $InString){
if($Character -eq "("){
$Depth++
}elseif($Character -eq ")"){
$Depth--
}elseif($Character -eq "," -and $Depth -eq 0){
$Arguments += $Current.ToString().Trim()
[void]$Current.Clear()
continue
}
}
[void]$Current.Append($Character)
}
if($Current.Length -gt 0){
$Arguments += $Current.ToString().Trim()
}
return $Arguments
}