Example #1
0
 public async Task Handle(UpdateCredentialsCommand message)
 {
     if (!_database.IsOpen)
     {
         throw new DatabaseClosedException();
     }
     _database.UpdateCredentials(new Credentials
     {
         KeyFileContents = !string.IsNullOrEmpty(message.KeyFilePath) ? await _file.ReadBinaryFile(message.KeyFilePath) : null,
         Password        = message.Password
     });
 }