More refactoring

This commit is contained in:
TheXamlGuy
2024-01-11 19:52:48 +00:00
parent 7ccfedb5e2
commit 814c806240
16 changed files with 125 additions and 78 deletions
@@ -6,9 +6,11 @@ namespace Hyperbar.Windows.Primary;
public class PrimaryWidgetProvider :
IWidgetProvider
{
public void Create(HostBuilderContext comtext, IServiceCollection services) =>
public void Create(HostBuilderContext comtext, IServiceCollection services) =>
services.AddConfiguration<PrimaryWidgetConfiguration>()
.AddHandler<WidgetComponentMapping>()
.AddHandler<PrimaryWidgetConfigurationChangedHandler>()
.AddWidgetTemplate<PrimaryWidgetViewModel>();
.AddTransient<IFactory<IEnumerable<IWidgetComponentViewModel>>, WidgetComponentViewModelFactory>()
.AddWidgetTemplate<PrimaryWidgetViewModel>()
.AddNotificationPipeline<ConfigurationChanged<PrimaryWidgetConfiguration>,
ValueChanging<IEnumerable<IWidgetComponentViewModel>>>();
}