$ show marcinotorowski/MSIX-Hero
MSIX Hero is a comprehensive MSIX/AppX package management toolkit providing both WPF GUI and CLI interfaces for creating, editing, signing, packaging, and deploying Windows applications. The application follows a modular architecture using Prism for MVVM and dependency injection, with separate modules for package management, volume management, event viewing, system status, and various dialogs. Core functionality includes MSIX package reading/editing via Appx.Reader and Appx.Editor, signing via Appx.Signing, dependency analysis, AppAttach volume management for Windows Virtual Desktop, Winget manifest handling, and system diagnostics. The codebase demonstrates strong separation of concerns, extensive use of interfaces for testability, and reusable patterns in IPC, progress handling, and MVVM property implementations.
The LLM identified 5 files worth highlighting for reuse:
Implements stream-based inter-process communication with JSON serialization for secure communication between elevated and non-elevated processes. Features thread-safe stream access via AutoResetEvent, JSON-based message protocol with defined types (Complete, Exception, Progress, Method invocation), method invocation marshalling, and type resolution helpers. Self-contained and reusable in any .NET application requiring secure IPC.
Reads and deserializes Winget manifest files from YAML format into YamlManifest objects with both synchronous and asynchronous methods. Demonstrates excellent resource management through Lazy<IDeserializer> for efficient deserializer reuse, proper async/sync method pairs following .NET I/O patterns, Stream-to-text-reader adaptation to avoid code duplication, and ConfigureAwait(false) for library-style context independence. The pattern is directly reusable for any YAML deserialization needs.
Provides a sophisticated implementation of editable properties with change tracking and validation including ChangeableProperty, ChangeableFileProperty, ChangeableFolderProperty, and ChangeableCollection. Features built-in validation support, change tracking, integration with WPF data binding, and separation of concerns between property values and their edit state. This pattern could be extracted as a reusable MVVM library for applications requiring editable fields with validation.
Implements a comprehensive progress reporting system with BusyManager, ProgressProperty, RangeProgress, and WrappedProgress classes for sophisticated progress reporting in long-running operations. Notable for its scoped progress reporting (RangeProgress) that allows nested operations to report progress within a parent operation, proper IProgress<ProgressData> implementations, and support for cancellation tokens. Represents a significant improvement over basic IProgress<T> implementations for complex UI applications.
Provides a centralized factory pattern for creating validation rules that can be applied to ChangeableProperty instances. Demonstrates reusable validation logic through a factory that creates validation attributes based on property types and constraints, supporting both synchronous and asynchronous validation. The pattern allows validation rules to be defined once and reused across different properties and views, promoting consistency and reducing duplication in validation logic.