doc/devdocs/core/settings/runner-ipc.md
The Settings v2 process uses two way IPC to communicate with the runner process.
ShellPage.xaml.cs file. The delegates are static and the views for all the powerToys send the ipc information to the viewmodels as ShellPage.DefaultSndMSGCallBack.MainWindow.xaml.cs file in the Settings.Runner project.SendDefaultMessage - This is used by all the viewmodels to communicate changes in the UI to the runner so that the information can be dispatched to the modules.RestartAsAdminCheckForUpdatesShellPage.xaml.cs file.general, whereas if any information has been modified by the user in any powertoy related settings page, the name of the json file being communicated with the runner is set to powertoy.ShellPage object has a IPCResponseHandleList which is a list of functions which handle IPC responses.// receive IPC Message
Program.IPCMessageReceivedCallback = (string msg) =>
{
if (ShellPage.ShellHandler.IPCResponseHandleList != null)
{
try
{
JsonObject json = JsonObject.Parse(msg);
foreach (Action<JsonObject> handle in ShellPage.ShellHandler.IPCResponseHandleList)
{
handle(json);
}
}
catch (Exception)
{
}
}
};
GeneralPage.xaml.cs when the user clicks the check for updates button. The information displayed after, such as the user has the latest version installed is a result of this handle.