using EnvelopeGenerator.Application.Annotations.Commands; using MediatR; namespace EnvelopeGenerator.Application.Common.Notifications.DocSigned.Handlers; /// /// /// public class AnnotationHandler : INotificationHandler { /// /// /// private readonly ISender _sender; /// /// /// /// public AnnotationHandler(ISender sender) { _sender = sender; } /// /// /// /// /// /// /// public Task Handle(DocSignedNotification notification, CancellationToken cancel) => _sender.Send(new CreateAnnotationCommand() { Envelope = new() { Id = notification.EnvelopeId }, Receiver = new() { Id = notification.ReceiverId }, PSPDFKitInstant = notification.PsPdfKitAnnotation.Instant }, cancel); }