using DigitalData.Core.Abstraction.Application.Repository; using EnvelopeGenerator.Domain.Entities; using MediatR; namespace EnvelopeGenerator.Application.Common.Notifications.RemoveSignature.Handlers; /// /// /// public class RemoveAnnotationHandler : INotificationHandler { private readonly IRepository _repo; /// /// /// /// public RemoveAnnotationHandler(IRepository repository) { _repo = repository; } /// /// /// /// /// /// public Task Handle(RemoveSignatureNotification notification, CancellationToken cancel) { return _repo.DeleteAsync(a => a.Element!.Document.Envelope!.Uuid == notification.EnvelopeUuid, cancel); } }