public Task Handle(EmergencyCall message, IMessageHandlerContext context) { var rover = RoverRepository.GetRover( Guid.Parse(EncryptionUtils.Instance.Decrypt(message.EncryptedRoverId))); rover.Lock(); RoverRepository.UpdateRover(rover); return(Task.CompletedTask); }
public Task Handle(MoveCommand message, IMessageHandlerContext context) { var rover = RoverRepository.GetRover( Guid.Parse(EncryptionUtils.Instance.Decrypt(message.EncryptedRoverId))); rover.ApplyMoveCommand(message.EncryptedMoveCommand); RoverRepository.UpdateRover(rover); return(Task.CompletedTask); }