- Replace byte[] and Base64String with required Stream PdfStream - Simplify validators: remove XOR/Base64 validation, only check NotNull - Affected queries: ValidatePdfQuery, ValidatePdfAQuery, CheckPdfAttachmentsQuery, ExtractSwissQrCodeQuery - Memory efficiency: direct stream usage, no intermediate byte[] copies
19 lines
522 B
C#
19 lines
522 B
C#
using FluentValidation;
|
|
|
|
namespace DocumentOperator.Application.CheckPdfAttachments.Queries;
|
|
|
|
/// <summary>
|
|
/// Validator for CheckPdfAttachmentsQuery
|
|
/// Ensures PdfStream is not null
|
|
/// </summary>
|
|
public class CheckPdfAttachmentsQueryValidator : AbstractValidator<CheckPdfAttachmentsQuery>
|
|
{
|
|
public CheckPdfAttachmentsQueryValidator()
|
|
{
|
|
// Rule: PdfStream must be provided and non-empty
|
|
RuleFor(x => x.PdfStream)
|
|
.NotNull()
|
|
.WithMessage("PdfStream is required");
|
|
}
|
|
}
|