It it now possible to create/edit item contents

This commit is contained in:
TheXamlGuy
2024-06-06 20:42:23 +01:00
parent 1302145f1c
commit c399e8c05c
30 changed files with 331 additions and 180 deletions
+5 -3
View File
@@ -6,12 +6,14 @@ namespace Bitvault;
public class OpenLockerHandler(IConfigurationDescriptor<LockerConfiguration> descriptor,
ISecurityKeyFactory securityKeyFactory,
ILockerStorageFactory lockerStorageFactory) :
IHandler<ActivateEventArgs<Locker>, bool>
IHandler<ActivateEventArgs<Locker<string>>, bool>
{
public async Task<bool> Handle(ActivateEventArgs<Locker> args,
public async Task<bool> Handle(ActivateEventArgs<Locker<string>> args,
CancellationToken cancellationToken)
{
if (args.Value is Locker locker && descriptor.Name is { Length: > 0 } name && locker.Password is { Length: > 0 } password)
if (args.Value is Locker<string> locker &&
descriptor.Name is { Length: > 0 } name &&
locker.Value is { Length: > 0 } password)
{
LockerConfiguration configuration = descriptor.Value;
if (configuration.Key?.Split(':') is { Length: >= 2 } keyPart)