This commit implements a complete rebranding of the project: - Updated all namespaces from `DocumentOperator` to `DocumentService`. - Renamed file paths, embedded resources, and test data references. - Updated configuration keys, logging paths, and Redis instance names. - Revised documentation to reflect the new project name. - Modified project and solution files to align with the new structure. - Updated class names, DTOs, commands, queries, and handlers. - Adjusted middleware, controllers, and API endpoints. - Updated Swagger metadata and API titles to `DocumentService API`. - Refactored test namespaces, resource paths, and embedded resources. - Updated build and deployment configurations for the new name. - Replaced all references to `DocumentOperator` in comments and literals. These changes ensure consistency across the codebase and documentation.
35 lines
1.1 KiB
C#
35 lines
1.1 KiB
C#
namespace DocumentService.Application.Common.DTOs;
|
|
|
|
/// <summary>
|
|
/// PDF/A validation metadata including conformance level and validation errors/warnings
|
|
/// </summary>
|
|
public sealed class PdfAMetadata(
|
|
bool isValid,
|
|
string pdfVersion,
|
|
int pageCount,
|
|
long fileSizeBytes,
|
|
bool encrypted,
|
|
string? pdfaVersion,
|
|
bool pdfaCompliant,
|
|
IReadOnlyList<string> errors,
|
|
IReadOnlyList<string> warnings)
|
|
{
|
|
public bool IsValid { get; } = isValid;
|
|
public string PdfVersion { get; } = pdfVersion;
|
|
public int PageCount { get; } = pageCount;
|
|
public long FileSizeBytes { get; } = fileSizeBytes;
|
|
public bool Encrypted { get; } = encrypted;
|
|
public string? PdfAVersion { get; } = pdfaVersion;
|
|
public bool PdfACompliant { get; } = pdfaCompliant;
|
|
public IReadOnlyList<string> Errors { get; } = errors;
|
|
public IReadOnlyList<string> Warnings { get; } = warnings;
|
|
|
|
// Computed property
|
|
public double FileSizeMB => FileSizeBytes / 1024.0 / 1024.0;
|
|
|
|
public override string ToString()
|
|
{
|
|
return $"PDF/A: {PdfAVersion ?? "None"}, {PageCount} pages, {FileSizeMB:F2} MB, Compliant: {PdfACompliant}";
|
|
}
|
|
}
|