This commit is contained in:
TheXamlGuy
2024-04-26 22:27:31 +01:00
parent fd8a20c081
commit bab5f218e8
30 changed files with 164 additions and 108 deletions
+4 -2
View File
@@ -8,7 +8,7 @@ public class VaultFactory(IServiceProvider provider,
IComponentScopeCollection scopes,
IVaultHostCollection vaults) : IVaultFactory
{
public async Task CreateAsync(string name,
public IComponentHost? Create(string name,
VaultConfiguration configuration)
{
if (provider.GetRequiredService<IVaultComponent>() is IVaultComponent component)
@@ -45,7 +45,9 @@ public class VaultFactory(IServiceProvider provider,
host.Services.GetRequiredService<IServiceProvider>()));
vaults.Add(host);
await host.StartAsync();
return host;
}
return default;
}
}