Repository navigation
architecture
Pure Logic Code edited this page Nov 6, 2026
·
1 revision
BatchConvertToCompressedFile/
App.axaml / App.axaml.cs Composition root, global exception handling
Program.cs Avalonia entry point
AppConfig.cs Identity, endpoints, environment overrides
Views/ MainWindow, AboutWindow, MessageDialog
ViewModels/ MainWindowViewModel
Services/ Archive, batch, update, stats, donation, shell
Logging/ Serilog setup, bug report sink/formatter/service
Models/ Records and enums
Interfaces/ Service contracts
Themes/DarkTheme.axaml Black/indigo theme
BatchConvertToCompressedFile.Tests/ xUnit test suite
docs/ Documentation
.github/workflows/ CI, release, CodeQL, dependency review, docs
| Package | Purpose |
|---|---|
| Avalonia / Avalonia.Desktop / Fluent | Cross-platform UI |
| Avalonia.Fonts.Inter | Professional typography |
| CommunityToolkit.Mvvm | Observable view model |
| SharpCompress | Managed 7z/zip creation, 7z/zip/rar verification |
| Serilog + File/Async/Debug sinks | Logging |
| xUnit + coverlet | Testing and coverage |
SharpCompress removes the need for native 7-Zip libraries on any platform.
-
Program.Mainbuilds the Avalonia app. -
App.OnFrameworkInitializationCompletedcreates the bug report service, Serilog logger, and global exception handlers. - Services are composed and the main window is created.
-
MainWindow.Openedloads donation state and starts the GitHub update check. - In parallel,
ApplicationStatsService.RecordStartupAsyncsends the startup hit.
MainWindowViewModel.StartCompressionAsync
-> validates folders/options
-> BatchArchiveProcessor.CompressBatchAsync
-> enumerates top-level files
-> ArchiveService.CompressFileAsync (SharpCompress writer)
-> optional original deletion
-> progress + statistics
-> BatchCompleted event -> summary dialog
Compression runs on background tasks. Partial archives are deleted on failure or cancellation.
MainWindowViewModel.StartVerificationAsync
-> validates folders/options
-> BatchArchiveProcessor.VerifyBatchAsync
-> enumerates .7z/.zip/.rar
-> ArchiveService.VerifyArchiveAsync
-> reads every entry
-> compares size and CRC-32
-> optional move via ArchiveFileMover
-> BatchCompleted event -> summary dialog
- UI bindings update on the Avalonia dispatcher.
-
MainWindowViewModelcaptures the UISynchronizationContextand marshals timer updates. - File and archive work runs via
Task.Runor async file APIs. - Cancellation uses
CancellationTokenSource; a linked 10-minute timeout applies per archive.
- Types are
internalby default. - Window classes are
internal(Avalonia instantiation happens in the same assembly). -
ArchiveFormatis public because it is used in public test signatures. - Public framework entry points (
App,Program.BuildAvaloniaApp) are documented.
- Expected conditions log at Information/Debug.
- Unexpected exceptions log at Error and reach the bug report API.
- Global handlers cover AppDomain, UI dispatcher, and unobserved task exceptions.
Batch Convert to Compressed File · GNU GPL v3 · Pure Logic Code