settings_re11

This commit is contained in:
lincube
2026-03-15 17:08:07 +08:00
parent c7fb48c8ee
commit f83c6ede1d
49 changed files with 3243 additions and 815 deletions

View File

@@ -327,6 +327,7 @@ public sealed class PluginLoader
RegisterHostService<ISettingsFacadeService>(services, hostServices);
RegisterHostService<ISettingsService>(services, hostServices);
RegisterHostService<ISettingsCatalog>(services, hostServices);
RegisterHostService<IAppearanceThemeService>(services, hostServices);
return services;
}

View File

@@ -835,10 +835,11 @@ public sealed class PluginRuntimeService : IDisposable
{
private readonly IPluginPackageManager _packageManager;
private readonly IHostApplicationLifecycle _applicationLifecycle;
private readonly IPluginExportRegistry _exportRegistry;
private readonly ISettingsFacadeService _settingsFacade;
private readonly ISettingsService _settingsService;
private readonly ISettingsCatalog _settingsCatalog;
private readonly IPluginExportRegistry _exportRegistry;
private readonly ISettingsFacadeService _settingsFacade;
private readonly ISettingsService _settingsService;
private readonly ISettingsCatalog _settingsCatalog;
private readonly IAppearanceThemeService _appearanceThemeService;
public PluginHostServiceProvider(
IPluginPackageManager packageManager,
@@ -854,6 +855,7 @@ public sealed class PluginRuntimeService : IDisposable
_settingsFacade = settingsFacade;
_settingsService = settingsService;
_settingsCatalog = settingsCatalog;
_appearanceThemeService = HostAppearanceThemeProvider.GetOrCreate();
}
public object? GetService(Type serviceType)
@@ -888,6 +890,11 @@ public sealed class PluginRuntimeService : IDisposable
return _settingsCatalog;
}
if (serviceType == typeof(IAppearanceThemeService))
{
return _appearanceThemeService;
}
return null;
}
}