function Update-CustomSignals {
param(
[Parameter(Mandatory)]
[hashtable]$Signals
)
if ($Signals -and ($Signals.Count -gt 0)) {
if ($Loopz) {
if (-not($Loopz.CustomSignals)) {
$Loopz.CustomSignals = @{}
}
$Signals.GetEnumerator() | ForEach-Object {
if ($_.Value -is [couplet]) {
$Loopz.CustomSignals[$_.Key] = $_.Value;
}
else {
Write-Warning "Skipping custom signal('$($_.Key)'); not a valid couplet/pair: $($_.Value)";
}
}
}
}
}
Somehow, I lost rrack of this function, thinking that it was already commited, turns out forgot to commit it. It was simply lying around in old test version Loopz and was nearly lost by accident.
Somehow, I lost rrack of this function, thinking that it was already commited, turns out forgot to commit it. It was simply lying around in old test version Loopz and was nearly lost by accident.