Files
Walleby/Bitvault/ContainerFactory.cs
T
TheXamlGuy 12d1392207 Codemaid
2024-05-24 08:21:49 +01:00

18 lines
451 B
C#

using Toolkit.Foundation;
namespace Bitvault;
public class ContainerFactory(IComponentFactory componentFactory) :
IContainerFactory
{
public IComponentHost? Create(string name)
{
if (componentFactory.Create<IContainerComponent, ContainerConfiguration>($"Vault:{name}",
new ContainerConfiguration { Name = name }) is IComponentHost host)
{
return host;
}
return default;
}
}