OrderFinalManageHandler.cs 989 B

1234567891011121314151617181920212223242526272829
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using Hotline.FlowEngine.Notifications;
  7. using Hotline.Orders;
  8. using MediatR;
  9. namespace Hotline.Application.Handlers.FlowEngine
  10. {
  11. public class OrderFinalManageHandler : INotificationHandler<OrderFinalManageNotify>
  12. {
  13. private readonly IOrderDomainService _orderDomainService;
  14. public OrderFinalManageHandler(IOrderDomainService orderDomainService)
  15. {
  16. _orderDomainService = orderDomainService;
  17. }
  18. /// <summary>Handles a notification</summary>
  19. /// <param name="notification">The notification</param>
  20. /// <param name="cancellationToken">Cancellation token</param>
  21. public async Task Handle(OrderFinalManageNotify notification, CancellationToken cancellationToken)
  22. {
  23. await _orderDomainService.FinalManageAsync(notification.Workflow.Id, cancellationToken);
  24. }
  25. }
  26. }