Files
EnvelopeGenerator/EnvelopeGenerator.Application/Common/Notifications/DocSigned/DocSignedNotification.cs
TekH c7fe3f0b9c Mark PsPdfKitAnnotation as obsolete
Added an [Obsolete] attribute to the PsPdfKitAnnotation property
in the DocSignedNotification class, indicating that the PSPDFKit
library is deprecated.

Reorganized using directives in DocumentReceiverElementService.cs
to improve consistency and maintain code readability.
2026-06-09 19:04:55 +02:00

37 lines
1.3 KiB
C#

using EnvelopeGenerator.Application.Common.Dto;
using EnvelopeGenerator.Application.Common.Dto.EnvelopeReceiver;
using EnvelopeGenerator.Application.Common.Extensions;
using EnvelopeGenerator.Domain.Constants;
using MediatR;
namespace EnvelopeGenerator.Application.Common.Notifications.DocSigned;
/// <summary>
/// Notification raised when a document is signed by a receiver.
/// </summary>
[Obsolete("This notification is deprecated. Use Signature.Commands.SignCommand instead.")]
public record DocSignedNotification : INotification, ISendMailNotification
{
/// <summary>
/// The envelope receiver information.
/// </summary>
public required EnvelopeReceiverDto EnvelopeReceiver { get; init; }
/// <summary>
/// The PSPDFKit annotation data.
/// </summary>
[Obsolete("The PSPDFKit library is deprecated.")]
public PsPdfKitAnnotation? PsPdfKitAnnotation { get; init; }
/// <summary>
/// Gets the email template type.
/// </summary>
public EmailTemplateType TemplateType => EmailTemplateType.DocumentSigned;
/// <summary>
/// Gets the email address of the receiver.
/// </summary>
public string EmailAddress => EnvelopeReceiver.Receiver?.EmailAddress
?? throw new InvalidOperationException($"Receiver is null." +
$"DocSignedNotification:\n{this.ToJson(Format.Json.ForDiagnostics)}");
}