Initial commit: NexusArchitect Professional Workstation Overhaul

This commit is contained in:
Debian
2026-04-24 20:27:22 +02:00
commit f3e94c4f42
193 changed files with 5809 additions and 0 deletions
@@ -0,0 +1,5 @@
using NexusReader.Application.Abstractions.Messaging;
namespace NexusReader.Application.Commands.Quiz;
public record SubmitAnswerCommand(int SelectedIndex, int CorrectIndex) : ICommand;
@@ -0,0 +1,26 @@
using FluentResults;
using NexusReader.Application.Abstractions.Messaging;
using NexusReader.Application.Abstractions.Services;
namespace NexusReader.Application.Commands.Quiz;
internal sealed class SubmitAnswerCommandHandler : ICommandHandler<SubmitAnswerCommand>
{
private readonly IPlatformService _platformService;
public SubmitAnswerCommandHandler(IPlatformService platformService)
{
_platformService = platformService;
}
public async Task<Result> Handle(SubmitAnswerCommand request, CancellationToken cancellationToken)
{
if (request.SelectedIndex == request.CorrectIndex)
{
await _platformService.VibrateAsync(50);
return Result.Ok();
}
return Result.Fail("Incorrect answer.");
}
}