18 lines
437 B
C#
18 lines
437 B
C#
using Toolkit.Foundation;
|
|
|
|
namespace Bitvault;
|
|
|
|
public class LockerFactory(IComponentFactory componentFactory) :
|
|
ILockerFactory
|
|
{
|
|
public IComponentHost? Create(string name)
|
|
{
|
|
if (componentFactory.Create<ILockerComponent, LockerConfiguration>($"Locker:{name}",
|
|
new LockerConfiguration { Name = name }) is IComponentHost host)
|
|
{
|
|
return host;
|
|
}
|
|
|
|
return default;
|
|
}
|
|
} |