Amend compoments to be keyed based

This commit is contained in:
TheXamlGuy
2024-06-29 11:23:44 +01:00
parent 4e377b35d1
commit 46b5931484
7 changed files with 24 additions and 14 deletions
+17 -3
View File
@@ -1,6 +1,20 @@
using Toolkit.Foundation;
using Microsoft.Extensions.Hosting;
using Toolkit.Foundation;
namespace Wallet;
public class WalletComponent(IComponentBuilder builder) : Component(builder),
IWalletComponent;
public class WalletComponent(IHostEnvironment environment,
IComponentBuilder builder) :
Component(builder)
{
public override IComponentBuilder Configuring(string key,
IComponentBuilder builder)
{
builder.SetComponentConfiguration(args =>
{
args.ContentRoot = Path.Combine(environment.ContentRootPath, key.Replace(":", "\\"));
});
return base.Configuring(key, builder);
}
}