Files
DocumentService/DocumentService.Client/Clients/PdfConversionClient.cs
TekH 189622c476 Refactor: Standardize method names across clients
Renamed methods across multiple client classes for consistency,
shortening and aligning naming conventions (e.g., `CheckAttachmentsAsync` → `CheckAsync`, `ValidatePdfAsync` → `ValidateAsync`).

Updated corresponding interfaces, unit tests, and documentation
to reflect the new method names. Standardized method signatures
to support both `Stream` and `byte[]` overloads consistently.

Improved error handling in tests and updated examples in the
README for batch processing and validation scenarios. Enhanced
API endpoint overview for clarity.
2026-08-31 03:40:43 +02:00

49 lines
2.2 KiB
C#

using DocumentService.Client.Interfaces;
using DocumentService.Application.Common.DTOs.Requests;
using Microsoft.Extensions.Logging;
using System.Net.Http;
namespace DocumentService.Client.Clients;
/// <summary>
/// Implementation of PDF conversion client (PDF ? PDF/A).
/// </summary>
/// <remarks>
/// All methods throw <see cref="NotImplementedException"/> because the corresponding
/// API endpoints are not yet implemented on the server side.
/// </remarks>
public class PdfConversionClient(HttpClient httpClient, ILogger<PdfConversionClient> logger) : BaseDocumentClient(httpClient, logger), IPdfConversionClient
{
/// <inheritdoc />
[Obsolete("API endpoint not implemented yet")]
public Task<Stream> ToPdfAAsync(Stream pdfStream, string pdfALevel = "PDF/A-3b", CancellationToken cancellationToken = default)
{
Logger.LogWarning("ConvertToPdfA endpoint is not implemented yet in API");
throw new NotImplementedException("API endpoint POST /api/pdf/conversion/to-pdfa is not implemented yet");
}
/// <inheritdoc />
[Obsolete("API endpoint not implemented yet")]
public Task<Stream> ToPdfAAsync(byte[] pdfBytes, string pdfALevel = "PDF/A-3b", CancellationToken cancellationToken = default)
{
Logger.LogWarning("ConvertToPdfA endpoint is not implemented yet in API");
throw new NotImplementedException("API endpoint POST /api/pdf/conversion/to-pdfa is not implemented yet");
}
/// <inheritdoc />
[Obsolete("API endpoint not implemented yet")]
public Task<Stream> FromPdfAAsync(Stream pdfStream, CancellationToken cancellationToken = default)
{
Logger.LogWarning("ConvertFromPdfA endpoint is not implemented yet in API");
throw new NotImplementedException("API endpoint POST /api/pdf/conversion/from-pdfa is not implemented yet");
}
/// <inheritdoc />
[Obsolete("API endpoint not implemented yet")]
public Task<Stream> FromPdfAAsync(byte[] pdfBytes, CancellationToken cancellationToken = default)
{
Logger.LogWarning("ConvertFromPdfA endpoint is not implemented yet in API");
throw new NotImplementedException("API endpoint POST /api/pdf/conversion/from-pdfa is not implemented yet");
}
}