32 lines
905 B
C#
32 lines
905 B
C#
using DigitalData.Core.Abstraction.Application.Repository;
|
|
using MediatR;
|
|
|
|
namespace EnvelopeGenerator.Application.Common.Notifications.RemoveSignature.Handlers;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
public class RemoveAnnotationHandler : INotificationHandler<RemoveSignatureNotification>
|
|
{
|
|
private readonly IRepository _repo;
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="repository"></param>
|
|
public RemoveAnnotationHandler(IRepository repository)
|
|
{
|
|
_repo = repository;
|
|
}
|
|
|
|
/// <summary>
|
|
///
|
|
/// </summary>
|
|
/// <param name="notification"></param>
|
|
/// <param name="cancel"></param>
|
|
/// <returns></returns>
|
|
public async Task Handle(RemoveSignatureNotification notification, CancellationToken cancel)
|
|
{
|
|
await _repo.DeleteAsync<Domain.Entities.DocumentStatus>(s => s.EnvelopeId == notification.EnvelopeId, cancel);
|
|
}
|
|
} |