mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 19:27:56 +01:00
* created a folder for settings and added an overview, hotkey information * basic structure for communication between settings and runner * Added information about the IPC communication between settings and runner * Added information about the communication between the settings process and modules * Added details on backward compatibility * brief overview on settings utils * added an overview of the viewmodels and anomalies * minor modifications * Settings v2 dev docs (#7334) * Added settings architecture and tech stack dev docs * Added telemetry and updated architecture docs for settings v2 * Fix image link in ui_architecture markdown * Added table of contents for settings v2 * Correct file path for ui architecture image * nit fix in table of contents heading * Add doc for xaml island tweaks Co-authored-by: Divyansh Srivastava <somm14divi@gmail.com>
1.3 KiB
1.3 KiB
Settings Utilities
- Abstractions for each of the file/folder related operations are present in
SettingsUtils.cs. - To reduce contention between the settings process and runner while trying to access the
settings.jsonfile of any powertoy, the settings process tries to access the file only when it needs to load the information for the first time. However, there is still no mechanism in place which ensures that both the settings and runner processes do not access the information simultaneously leading toIOExceptions.
Utilities
GetSettings<T>(powertoy, filename)
- The GetSettings function tries to read the file in the powertoy settings folder and creates a new file with default configurations if it does not exist.
- Ideally this function should only be called by the
SettingsRepositorywhich would be accessed only when a powertoy settings object is being loaded for the first time. - The reason behind ensuring that it is not accessed elsewhere is to avoid contention with the runner during file access.
- Each of the objects which are deserialized using this function must implement the
ISettingsConfiginterface.