Skip to content

515 the trusted pluginsjson is written to and loaded from appdatalogexpert in portable mode#532

Merged
Hirogen merged 6 commits intoDevelopmentfrom
515-the-trusted-pluginsjson-is-written-to-and-loaded-from-appdatalogexpert-in-portable-mode
Mar 3, 2026
Merged

515 the trusted pluginsjson is written to and loaded from appdatalogexpert in portable mode#532
Hirogen merged 6 commits intoDevelopmentfrom
515-the-trusted-pluginsjson-is-written-to-and-loaded-from-appdatalogexpert-in-portable-mode

Conversation

@Hirogen
Copy link
Copy Markdown
Collaborator

@Hirogen Hirogen commented Mar 3, 2026

This pull request introduces significant improvements to configuration management, especially around portable mode support and migration, as well as modernizes some threading and filtering logic. The most important changes are grouped below.

Configuration Management and Portable Mode Enhancements:

  • Added new properties to ConfigManager for unified portable configuration and session directories (PortableConfigDir, PortableSessionDir, ActiveSessionDir, ActiveConfigDir), and marked the old PortableModeDir as obsolete for migration purposes.
  • Implemented robust migration logic: when loading settings, the code now detects old and new portable layouts, migrates files as needed, and logs the process. New methods handle migration (MigrateOldPortableLayout), copying (CopyConfigToPortable), and moving (MoveConfigFromPortable) configuration between standard and portable modes. [1] [2]
  • Refactored file and directory operations into helper methods for moving, copying, and recursively copying directories, improving maintainability and clarity.
  • Updated the save logic to use the new ActiveConfigDir property, ensuring configuration files are saved in the correct location depending on the mode.
  • Improved deserialization error handling by using the null-coalescing operator to throw immediately if deserialization returns null.

Threading and Filtering Improvements:

  • Updated the FilterStarter.DoFilter method to be asynchronous (returns Task), runs filter work in parallel tasks, and waits for all tasks to complete before merging results, thus improving performance and reliability. [1] [2] [3]
  • Removed the now-unnecessary FilterDoneCallback method, simplifying the filter result collection logic.
  • Minor improvement: ensured the result of ThreadPool.SetMinThreads is captured to avoid compiler warnings.

Other Codebase Updates:

  • Refactored the Persister.SavePersistenceData method to use a more descriptive parameter name (sessionBaseDirectory instead of applicationStartupPath) and updated its usage accordingly.
  • Added a missing using directive for LogExpert.Core.Interface in Persister.cs

Platform Targeting:

  • Marked the ConfigManager class with the [SupportedOSPlatform("windows")] attribute to clarify platform compatibility.
  • Removed redundant platform attribute from a method, as the class is now OS-annotated.

BRUNER Patrick and others added 3 commits March 3, 2026 10:39
…om-appdatalogexpert-in-portable-mode' of https://github.com/LogExperts/LogExpert into 515-the-trusted-pluginsjson-is-written-to-and-loaded-from-appdatalogexpert-in-portable-mode
@Hirogen Hirogen merged commit 13e66b2 into Development Mar 3, 2026
1 check passed
@Hirogen Hirogen deleted the 515-the-trusted-pluginsjson-is-written-to-and-loaded-from-appdatalogexpert-in-portable-mode branch March 3, 2026 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The trusted-plugins.json is written to and loaded from %AppData%\LogExpert in portable mode

1 participant