Removed ModernKeePassLib dependency

Code cleanup
WIP on service replacement and VM use
This commit is contained in:
Geoffroy BONNEVILLE
2020-03-27 18:45:13 +01:00
parent e3638c2f5c
commit 45fcf7e8ab
31 changed files with 383 additions and 277 deletions

View File

@@ -8,7 +8,8 @@ namespace ModernKeePass.Application.Database.Commands.UpdateCredentials
{
public class UpdateCredentialsCommand: IRequest
{
public Credentials Credentials { get; set; }
public string Password { get; set; }
public string KeyFilePath { get; set; }
public class UpdateCredentialsCommandHandler : IAsyncRequestHandler<UpdateCredentialsCommand>
{
@@ -21,7 +22,14 @@ namespace ModernKeePass.Application.Database.Commands.UpdateCredentials
public async Task Handle(UpdateCredentialsCommand message)
{
if (_database.IsOpen) await _database.UpdateCredentials(message.Credentials);
if (_database.IsOpen)
{
await _database.UpdateCredentials(new Credentials
{
KeyFilePath = message.KeyFilePath,
Password = message.Password
});
}
else throw new DatabaseClosedException();
}
}