Add per plugin json configuration support from a single file
This commit is contained in:
@@ -9,6 +9,5 @@
|
||||
<StackPanel Orientation="Horizontal" />
|
||||
</ItemsPanelTemplate>
|
||||
</ItemsControl.ItemsPanel>
|
||||
|
||||
</ItemsControl>
|
||||
</Page>
|
||||
|
||||
@@ -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; }
|
||||
|
||||
Reference in New Issue
Block a user