Viewmodel caching WIP

This commit is contained in:
TheXamlGuy
2024-01-12 21:57:47 +00:00
parent 2a773f26db
commit b47a563876
9 changed files with 59 additions and 15 deletions
@@ -8,10 +8,10 @@ public class PrimaryWidgetProvider :
{
public void Create(HostBuilderContext comtext, IServiceCollection services) =>
services.AddConfiguration<PrimaryWidgetConfiguration>()
.AddTransient<IViewModelEnumerator<IWidgetComponentViewModel>, WidgetComponentViewModelEnumerator>()
.AddTransient<IViewModelCache<Guid, IWidgetComponentViewModel>, ViewModelCache<Guid, IWidgetComponentViewModel>>()
.AddTransient<IViewModelFactory<PrimaryCommandConfiguration, IWidgetComponentViewModel?>, WidgetComponentViewModelFactory>()
.AddTransient<IViewModelEnumerator<IWidgetComponentViewModel>, WidgetComponentViewModelEnumerator>()
.AddWidgetTemplate<PrimaryWidgetViewModel>()
.AddNotificationPipeline<ConfigurationChanged<PrimaryWidgetConfiguration>,
CollectionChanged<IEnumerable<IWidgetComponentViewModel>>>();
.AddHandler<ConfigurationChangedHandler>();
}