Improve loading of widgets

This commit is contained in:
TheXamlGuy
2024-01-21 19:59:32 +00:00
parent 45070dc560
commit c07eafc9cf
49 changed files with 471 additions and 254 deletions
+3 -4
View File
@@ -10,14 +10,13 @@ public class PrimaryWidget :
{
args.Id = Guid.Parse("cfdfe07c-d9d6-4174-ae41-988ca24d2e10");
args.Name = "Primary commands";
}).ConfigureServices(args =>
}).ConfigureServices(services =>
{
args.AddCache<(Guid ParentId, Guid Id), PrimaryCommandConfiguration>()
services.AddCache<(Guid ParentId, Guid Id), PrimaryCommandConfiguration>()
.AddCache<Guid, IWidgetComponentViewModel>()
.AddTransient<IProvider<PrimaryCommandConfiguration, IWidgetComponentViewModel?>, WidgetComponentProvider>()
.AddTransient<IFactory<PrimaryCommandConfiguration, IWidgetComponentViewModel?>, WidgetComponentFactory>()
.AddTransient<IEnumerator<IWidgetComponentViewModel>, WidgetComponentEnumerator>()
.AddTransient<IEnumerator<IWidgetComponentViewModel>, WidgetComponentEnumerationHandler>()
.AddWidgetTemplate<PrimaryWidgetViewModel>()
.AddHandler<PrimaryWidgetConfigurationHandler>();
});