mirror of
https://github.com/rbalsleyMSFT/FFU.git
synced 2026-06-14 02:09:35 -06:00
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:
@@ -34,7 +34,6 @@ function Invoke-ParallelProcessing {
|
|||||||
}
|
}
|
||||||
$resultsCollection = [System.Collections.Generic.List[object]]::new()
|
$resultsCollection = [System.Collections.Generic.List[object]]::new()
|
||||||
$jobs = @()
|
$jobs = @()
|
||||||
$results = @() # Store results from jobs
|
|
||||||
$totalItems = $ItemsToProcess.Count
|
$totalItems = $ItemsToProcess.Count
|
||||||
$processedCount = 0
|
$processedCount = 0
|
||||||
|
|
||||||
|
|||||||
@@ -540,15 +540,15 @@ function BuildFeaturesGrid {
|
|||||||
$chk.Content = $featureName
|
$chk.Content = $featureName
|
||||||
$chk.Margin = "5"
|
$chk.Margin = "5"
|
||||||
$chk.Add_Checked({
|
$chk.Add_Checked({
|
||||||
param($sender, $e)
|
param($eventSource, $e)
|
||||||
$window = [System.Windows.Window]::GetWindow($sender)
|
$window = [System.Windows.Window]::GetWindow($eventSource)
|
||||||
if ($null -ne $window) {
|
if ($null -ne $window) {
|
||||||
UpdateOptionalFeaturesString -State $window.Tag
|
UpdateOptionalFeaturesString -State $window.Tag
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
$chk.Add_Unchecked({
|
$chk.Add_Unchecked({
|
||||||
param($sender, $e)
|
param($eventSource, $e)
|
||||||
$window = [System.Windows.Window]::GetWindow($sender)
|
$window = [System.Windows.Window]::GetWindow($eventSource)
|
||||||
if ($null -ne $window) {
|
if ($null -ne $window) {
|
||||||
UpdateOptionalFeaturesString -State $window.Tag
|
UpdateOptionalFeaturesString -State $window.Tag
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user