Rename SignCommand to SigningCommand across codebase

Updated all references to `SignCommand` to use the new `SigningCommand` name for consistency and clarity. This includes changes to class definitions, method signatures, and pipeline behaviors in the following files:

- `DependencyInjection.cs`: Updated pipeline behaviors to use `SigningCommand`.
- `AnnotationBehavior.cs`: Updated class definition and methods to use `SigningCommand`. Marked `SignCommand` as `[Obsolete]`.
- `DocStatusBehavior.cs`, `EnvelopeReceiverResolutionBehavior.cs`, `HistoryBehavior.cs`, `SendSignedMailBehavior.cs`: Updated class definitions and methods to use `SigningCommand`.
- `SendSignedMailBehavior.cs`: Updated `CreatePlaceHolders` method to accept `SigningCommand`.
- `SigningCommand.cs`: Renamed `SignCommand` record to `SigningCommand` and updated internal methods and properties. Renamed `SignCommandHandler` to `SigningCommandHandler`.

Marked `SignCommand` as `[Obsolete]` where applicable to indicate deprecation. These changes improve code readability and align the command name with its purpose in the signing process.
This commit is contained in:
2026-06-09 22:47:08 +02:00
parent 1569647b60
commit d59aa6157d
7 changed files with 19 additions and 19 deletions

View File

@@ -11,7 +11,7 @@ namespace EnvelopeGenerator.Application.Signatures.Behaviors;
/// Executes first in the signing process.
/// </summary>
[Obsolete("This notification is deprecated. Use Signature.Commands.SignCommand instead.")]
public class AnnotationBehavior : IPipelineBehavior<SignCommand, Unit>
public class AnnotationBehavior : IPipelineBehavior<SigningCommand, Unit>
{
private readonly IRepository<ElementAnnotation> _repo;
@@ -31,7 +31,7 @@ public class AnnotationBehavior : IPipelineBehavior<SignCommand, Unit>
/// <param name="next"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public async Task<Unit> Handle(SignCommand request, RequestHandlerDelegate<Unit> next, CancellationToken cancellationToken)
public async Task<Unit> Handle(SigningCommand request, RequestHandlerDelegate<Unit> next, CancellationToken cancellationToken)
{
if (request.PsPdfKitAnnotation is PsPdfKitAnnotation annot)
await _repo.CreateAsync(annot.Structured, cancellationToken);

View File

@@ -11,7 +11,7 @@ namespace EnvelopeGenerator.Application.Signatures.Behaviors;
/// Pipeline behavior that creates document status.
/// Executes second in the signing process.
/// </summary>
public class DocStatusBehavior : IPipelineBehavior<SignCommand, Unit>
public class DocStatusBehavior : IPipelineBehavior<SigningCommand, Unit>
{
private const string BlankAnnotationJson = "{}";
@@ -34,7 +34,7 @@ public class DocStatusBehavior : IPipelineBehavior<SignCommand, Unit>
/// <param name="cancellationToken"></param>
/// <returns></returns>
[Obsolete("This notification is deprecated. Use Signature.Commands.SignCommand instead.")]
public async Task<Unit> Handle(SignCommand request, RequestHandlerDelegate<Unit> next, CancellationToken cancellationToken)
public async Task<Unit> Handle(SigningCommand request, RequestHandlerDelegate<Unit> next, CancellationToken cancellationToken)
{
await _sender.Send(new CreateDocStatusCommand()
{

View File

@@ -15,7 +15,7 @@ namespace EnvelopeGenerator.Application.Signatures.Behaviors;
/// Executes FIRST in the signing process - before all other behaviors.
/// If EnvelopeReceiver is not provided, it queries the database using EnvelopeReceiverQueryBase parameters.
/// </summary>
public class EnvelopeReceiverResolutionBehavior : IPipelineBehavior<SignCommand, Unit>
public class EnvelopeReceiverResolutionBehavior : IPipelineBehavior<SigningCommand, Unit>
{
private readonly IRepository<EnvelopeReceiver> _erRepo;
private readonly IMapper _mapper;
@@ -38,7 +38,7 @@ public class EnvelopeReceiverResolutionBehavior : IPipelineBehavior<SignCommand,
/// <param name="next"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public async Task<Unit> Handle(SignCommand request, RequestHandlerDelegate<Unit> next, CancellationToken cancellationToken)
public async Task<Unit> Handle(SigningCommand request, RequestHandlerDelegate<Unit> next, CancellationToken cancellationToken)
{
// If EnvelopeReceiver is not provided, query it from database
if (request.EnvelopeReceiver is null)

View File

@@ -10,7 +10,7 @@ namespace EnvelopeGenerator.Application.Signatures.Behaviors;
/// Pipeline behavior that records history.
/// Executes third in the signing process.
/// </summary>
public class HistoryBehavior : IPipelineBehavior<SignCommand, Unit>
public class HistoryBehavior : IPipelineBehavior<SigningCommand, Unit>
{
private readonly ISender _sender;
@@ -30,7 +30,7 @@ public class HistoryBehavior : IPipelineBehavior<SignCommand, Unit>
/// <param name="next"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public async Task<Unit> Handle(SignCommand request, RequestHandlerDelegate<Unit> next, CancellationToken cancellationToken)
public async Task<Unit> Handle(SigningCommand request, RequestHandlerDelegate<Unit> next, CancellationToken cancellationToken)
{
if (request.EnvelopeReceiver.Receiver is null)
throw new InvalidOperationException($"Receiver information is missing in the notification. SignCommand:\n {request.ToJson(Format.Json.ForDiagnostics)}");

View File

@@ -17,7 +17,7 @@ namespace EnvelopeGenerator.Application.Signatures.Behaviors;
/// Pipeline behavior that sends signed mail notification.
/// Executes LAST in the signing process - only if all previous behaviors succeed.
/// </summary>
public class SendSignedMailBehavior : IPipelineBehavior<SignCommand, Unit>
public class SendSignedMailBehavior : IPipelineBehavior<SigningCommand, Unit>
{
private readonly IRepository<EmailTemplate> _tempRepo;
private readonly IRepository<EmailOut> _emailOutRepo;
@@ -50,7 +50,7 @@ public class SendSignedMailBehavior : IPipelineBehavior<SignCommand, Unit>
/// <param name="next"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public async Task<Unit> Handle(SignCommand request, RequestHandlerDelegate<Unit> next, CancellationToken cancellationToken)
public async Task<Unit> Handle(SigningCommand request, RequestHandlerDelegate<Unit> next, CancellationToken cancellationToken)
{
var placeHolders = CreatePlaceHolders(request);
@@ -82,7 +82,7 @@ public class SendSignedMailBehavior : IPipelineBehavior<SignCommand, Unit>
return await next(cancellationToken);
}
private Dictionary<string, string> CreatePlaceHolders(SignCommand request)
private Dictionary<string, string> CreatePlaceHolders(SigningCommand request)
{
var placeHolders = new Dictionary<string, string>()
{

View File

@@ -8,7 +8,7 @@ namespace EnvelopeGenerator.Application.Signatures.Commands;
/// <summary>
/// Command to sign a document by a receiver.
/// </summary>
public record SignCommand : EnvelopeReceiverQueryBase, IRequest
public record SigningCommand : EnvelopeReceiverQueryBase, IRequest
{
private EnvelopeReceiverDto? _envelopeReceiver;
@@ -37,7 +37,7 @@ public record SignCommand : EnvelopeReceiverQueryBase, IRequest
/// Handles the sign command. All work is done by pipeline behaviors.
/// This handler is intentionally empty - behaviors handle all the processing.
/// </summary>
public class SignCommandHandler : IRequestHandler<SignCommand>
public class SignCommandHandler : IRequestHandler<SigningCommand>
{
/// <summary>
/// Executes the signing command. Pipeline behaviors handle all processing.
@@ -45,7 +45,7 @@ public class SignCommandHandler : IRequestHandler<SignCommand>
/// <param name="request"></param>
/// <param name="cancellationToken"></param>
/// <returns></returns>
public Task Handle(SignCommand request, CancellationToken cancellationToken = default)
public Task Handle(SigningCommand request, CancellationToken cancellationToken = default)
{
return Task.CompletedTask;
}