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
+3 -2
View File
@@ -5,9 +5,10 @@ namespace Wallet;
public class WalletFactory(IComponentFactory componentFactory) :
IWalletFactory
{
public IComponentHost? Create(string name)
public IComponentHost? Create(string key)
{
if (componentFactory.Create<IWalletComponent, WalletConfiguration>($"Wallet:{name}", new WalletConfiguration()) is IComponentHost host)
if (componentFactory.Create<WalletComponent, WalletConfiguration>($"Wallet:{key}",
new WalletConfiguration()) is IComponentHost host)
{
return host;
}