Files
EnvelopeGenerator/EnvelopeGenerator.Application/Common/Dto/PdfVisualSignatureOptionsDto.cs
TekH 57a08e8a89 Refactor DTOs and simplify PdfDigitalSignatureService
Refactored `PdfSignOptionsDto` and `PdfVisualSignatureOptionsDto`:
- Converted both to immutable `record` types with non-nullable properties.
- Added XML documentation comments for properties and parameters.

Simplified `PdfDigitalSignatureService`:
- Updated `SignPdfAsync` to enforce non-nullable `PdfSignOptionsDto`.
- Removed redundant null checks and inlined `CreateSignatureBounds`.
- Simplified signature appearance and image data logic.
- Refactored `TryGetKeySize` to use `bool` with `out` parameter.

General improvements:
- Enhanced code readability and maintainability.
- Reduced nullable references and enforced stricter type safety.
2026-10-16 10:43:11 +02:00

21 lines
531 B
C#

namespace EnvelopeGenerator.Application.Common.Dto;
/// <summary>
///
/// </summary>
/// <param name="ImageBytes"></param>
/// <param name="PageNumber"></param>
/// <param name="Left"></param>
/// <param name="Bottom"></param>
/// <param name="Width"></param>
/// <param name="Height"></param>
/// <param name="ShowLabels"></param>
public sealed record PdfVisualSignatureOptionsDto(
byte[] ImageBytes,
int PageNumber,
double Left,
double Bottom,
double Width,
double Height,
bool ShowLabels = false);