Refactor: Improve code clarity and remove unused variable

Renames the event handler parameter from `$sender` to `$eventSource` for better readability.

Removes an unused variable in the parallel processing function to clean up the code.
This commit is contained in:
rbalsleyMSFT
2025-06-17 18:31:56 -07:00
parent 87c9bc769e
commit dbb98ba4fe
2 changed files with 12 additions and 13 deletions
@@ -540,19 +540,19 @@ function BuildFeaturesGrid {
$chk.Content = $featureName
$chk.Margin = "5"
$chk.Add_Checked({
param($sender, $e)
$window = [System.Windows.Window]::GetWindow($sender)
if ($null -ne $window) {
UpdateOptionalFeaturesString -State $window.Tag
}
})
param($eventSource, $e)
$window = [System.Windows.Window]::GetWindow($eventSource)
if ($null -ne $window) {
UpdateOptionalFeaturesString -State $window.Tag
}
})
$chk.Add_Unchecked({
param($sender, $e)
$window = [System.Windows.Window]::GetWindow($sender)
if ($null -ne $window) {
UpdateOptionalFeaturesString -State $window.Tag
}
})
param($eventSource, $e)
$window = [System.Windows.Window]::GetWindow($eventSource)
if ($null -ne $window) {
UpdateOptionalFeaturesString -State $window.Tag
}
})
$State.Controls.featureCheckBoxes[$featureName] = $chk # Track the checkbox