Updated project and solution files to rename and restructure `DocumentOperator` to `DocumentService`. Modified project references in `DocumentService.API.csproj`, `DocumentService.Application.csproj`, and `DocumentService.Infrastructure.csproj` to reflect the new naming convention. Updated `DocumentService.sln` to remove old project references, add new ones, and adjust configuration and nested project mappings accordingly. This change aligns the project structure with the new naming convention.
29 lines
851 B
C#
29 lines
851 B
C#
using DocumentService.Application.Common.DTOs;
|
|
using DocumentService.Application.Common.Interfaces;
|
|
using MediatR;
|
|
|
|
namespace DocumentService.Application.ValidatePdf.Queries;
|
|
|
|
/// <summary>
|
|
/// Query for PDF validation (Stream-based)
|
|
/// </summary>
|
|
public record ValidatePdfQuery : IRequest<PdfValidationResult>
|
|
{
|
|
/// <summary>
|
|
/// PDF as stream (caller is responsible for disposal)
|
|
/// </summary>
|
|
public required Stream PdfStream { get; init; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Handler for ValidatePdfQuery
|
|
/// </summary>
|
|
public class ValidatePdfQueryHandler(IPdfProcessor pdfProcessor)
|
|
: IRequestHandler<ValidatePdfQuery, PdfValidationResult>
|
|
{
|
|
public async Task<PdfValidationResult> Handle(ValidatePdfQuery request, CancellationToken cancellationToken)
|
|
{
|
|
return await pdfProcessor.ValidateAsync(request.PdfStream);
|
|
}
|
|
}
|