Add per plugin json configuration support from a single file

This commit is contained in:
TheXamlGuy
2024-01-05 21:54:48 +00:00
parent e180c966ff
commit b380f06fbf
30 changed files with 277 additions and 541 deletions
+4 -6
View File
@@ -1,6 +1,5 @@
using Hyperbar.Lifecycles;
using Hyperbar.Templates;
using System.Collections;
using System.Collections.Generic;
namespace Hyperbar.Desktop;
@@ -10,14 +9,13 @@ public partial class CommandViewModel :
ITemplatedViewModel
{
public CommandViewModel(ITemplateFactory templateFactory,
IEnumerable<ICommandViewModel> commands)
IEnumerable<ICommandViewModel> commands,
IWritableConfiguration<AppConfiguration> options)
{
TemplateFactory = templateFactory;
AddRange(commands);
foreach (var command in commands)
{
this.Add(command);
}
options.Update(args => { });
}
public ITemplateFactory TemplateFactory { get; }