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
866 B
C#
29 lines
866 B
C#
using DocumentService.Application.Common.DTOs;
|
|
using DocumentService.Application.Common.Interfaces;
|
|
using MediatR;
|
|
|
|
namespace DocumentService.Application.ValidatePdfA.Queries;
|
|
|
|
/// <summary>
|
|
/// Query for PDF/A validation (Stream-based)
|
|
/// </summary>
|
|
public record ValidatePdfAQuery : IRequest<PdfAValidationResult>
|
|
{
|
|
/// <summary>
|
|
/// PDF as stream (caller is responsible for disposal)
|
|
/// </summary>
|
|
public required Stream PdfStream { get; init; }
|
|
}
|
|
|
|
/// <summary>
|
|
/// Handler for ValidatePdfAQuery
|
|
/// </summary>
|
|
public class ValidatePdfAQueryHandler(IPdfProcessor pdfProcessor)
|
|
: IRequestHandler<ValidatePdfAQuery, PdfAValidationResult>
|
|
{
|
|
public async Task<PdfAValidationResult> Handle(ValidatePdfAQuery request, CancellationToken cancellationToken)
|
|
{
|
|
return await pdfProcessor.ValidatePdfAAsync(request.PdfStream);
|
|
}
|
|
}
|