From 3a94733047c9dc7f214b6e242ead9edea9f01854 Mon Sep 17 00:00:00 2001 From: TekH Date: Tue, 9 Jun 2026 19:11:55 +0200 Subject: [PATCH] Refactor SignCommand and deprecate PsPdfKitAnnotation Removed the `EmailAddress` property from the `SignCommand` class, which previously retrieved the receiver's email address and threw an exception if the receiver was null. This change eliminates reliance on `EnvelopeReceiver`. Removed the `ToJson` extension method usage and the associated `using EnvelopeGenerator.Application.Common.Extensions;` directive, as well as the unused `using EnvelopeGenerator.Domain.Constants;` directive. Marked the `PsPdfKitAnnotation` property as `[Obsolete]`, directing users to use `Signature.Commands.SignCommand` instead, signaling a transition to a newer implementation. --- .../Signatures/Commands/SignCommand.cs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/EnvelopeGenerator.Application/Signatures/Commands/SignCommand.cs b/EnvelopeGenerator.Application/Signatures/Commands/SignCommand.cs index 7b1b93f1..f5660f9b 100644 --- a/EnvelopeGenerator.Application/Signatures/Commands/SignCommand.cs +++ b/EnvelopeGenerator.Application/Signatures/Commands/SignCommand.cs @@ -1,8 +1,6 @@ using MediatR; using EnvelopeGenerator.Application.Common.Dto; using EnvelopeGenerator.Application.Common.Dto.EnvelopeReceiver; -using EnvelopeGenerator.Application.Common.Extensions; -using EnvelopeGenerator.Domain.Constants; namespace EnvelopeGenerator.Application.Signatures.Commands; @@ -21,13 +19,6 @@ public record SignCommand : IRequest /// [Obsolete("This notification is deprecated. Use Signature.Commands.SignCommand instead.")] public PsPdfKitAnnotation? PsPdfKitAnnotation { get; init; } - - /// - /// Gets the email address of the receiver. - /// - public string EmailAddress => EnvelopeReceiver.Receiver?.EmailAddress - ?? throw new InvalidOperationException($"Receiver is null." + - $"DocSignedNotification:\n{this.ToJson(Format.Json.ForDiagnostics)}"); } ///