add a central cache, for easy data retriveal

This commit is contained in:
TheXamlGuy
2024-01-14 20:35:38 +00:00
parent 1283e8ff58
commit 80f4d5a702
14 changed files with 154 additions and 122 deletions
@@ -8,7 +8,7 @@ public class PrimaryWidgetProvider :
{
public void Create(HostBuilderContext comtext, IServiceCollection services) =>
services.AddConfiguration<PrimaryWidgetConfiguration>()
.AddSingleton<ICache<Guid, IWidgetComponentViewModel>, Cache<Guid, IWidgetComponentViewModel>>()
.AddCache<Guid, IWidgetComponentViewModel>()
.AddTransient<IFactory<PrimaryCommandConfiguration, IWidgetComponentViewModel?>, WidgetComponentViewModelFactory>()
.AddTransient<IViewModelEnumerator<IWidgetComponentViewModel>, WidgetComponentViewModelEnumerator>()
.AddWidgetTemplate<PrimaryWidgetViewModel>()