Summary
Systematic code review and cleanup of GeneralUpdate.Core — removing dead code, fixing bugs, and reducing duplication.
Changes
Bug Fixes
- WindowsStrategy.Execute(): Added missing override — previously inherited
NotImplementedException from base class
- MacStrategy.Execute(): Fixed to delegate to
ExecuteAsync() instead of skipping the entire update pipeline
- DownloadProgressReporter: Moved "all completed" event to orchestrator — previously fired on every single-asset completion instead of once after all downloads finish
- StorageManager.GetAllfiles: Returns empty list instead of null on exception, preventing NullReferenceException
- FileNode.GetHashCode(): Fixed to use Name + Hash instead of object identity, respecting Equals/GetHashCode contract
- ObjectTranslator.GetPacketHash(): Safe pattern-match cast replacing unsafe cast that could NRE
- MutiDownloadCompletedEventArgs: Fixed typo
IsComplated to IsCompleted
Dead Code Removal
- Deleted
FileTreeCore\FileTreeEnumerator.cs — 5 duplicate types in unused namespace
- Deleted
IEventManager.cs — interface not implemented by EventManager, no references
- Removed unused
_diffMode field from ClientUpdateStrategy
- Removed unused
_script field and SetScript() from ConfiginfoBuilder
- Removed redundant
DriverDirectory hiding base class property in GlobalConfigInfo
- Removed dead static field
_compressionStrategy from CompressProvider
- Removed unused private constructor from VersionService
- Removed dead
_hooks/_reporter fields from SilentPollOrchestrator
- Removed empty
InfixOrder() methods from FileNode and FileTree
Code Deduplication
- Extracted
StreamDownloadAsync() shared download loop, eliminating ~50 lines of duplicate code
- Added
Hooks and Reporter properties to AbstractStrategy base class for subclass reuse
- Wired
_customSkipOption in GeneralUpdateBootstrap to actual execution flow
Documentation
- Fixed corrupted UTF-8 character in UpdateOption.cs XML doc
- Removed stale
script parameter from ProcessInfo.cs XML doc
Build: 0 errors, 0 warnings
Summary
Systematic code review and cleanup of
GeneralUpdate.Core— removing dead code, fixing bugs, and reducing duplication.Changes
Bug Fixes
NotImplementedExceptionfrom base classExecuteAsync()instead of skipping the entire update pipelineIsComplatedtoIsCompletedDead Code Removal
FileTreeCore\FileTreeEnumerator.cs— 5 duplicate types in unused namespaceIEventManager.cs— interface not implemented by EventManager, no references_diffModefield from ClientUpdateStrategy_scriptfield andSetScript()from ConfiginfoBuilderDriverDirectoryhiding base class property in GlobalConfigInfo_compressionStrategyfrom CompressProvider_hooks/_reporterfields from SilentPollOrchestratorInfixOrder()methods from FileNode and FileTreeCode Deduplication
StreamDownloadAsync()shared download loop, eliminating ~50 lines of duplicate codeHooksandReporterproperties to AbstractStrategy base class for subclass reuse_customSkipOptionin GeneralUpdateBootstrap to actual execution flowDocumentation
scriptparameter from ProcessInfo.cs XML docBuild: 0 errors, 0 warnings