Added the abilty to load configuration sections using * pattern

This commit is contained in:
TheXamlGuy
2024-04-24 23:08:58 +01:00
parent 672286cbfd
commit 4ffb3257f8
26 changed files with 318 additions and 70 deletions
+15
View File
@@ -0,0 +1,15 @@
using Toolkit.Foundation;
namespace Bitvault;
public class VaultHandler(IVaultFactory factory) : INotificationHandler<Create<Vault>>
{
public async Task Handle(Create<Vault> args,
CancellationToken cancellationToken = default)
{
if (args.Value is Vault vault)
{
await factory.CreateAsync($"Vault:{vault.Name}", new VaultConfiguration { Name = vault.Name });
}
}
}