using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Hotline.FlowEngine.Notifications; using Hotline.Orders; using Hotline.Settings; using MediatR; namespace Hotline.Application.Handlers.FlowEngine { public class OrderFinalManageHandler : INotificationHandler { private readonly IOrderDomainService _orderDomainService; public OrderFinalManageHandler(IOrderDomainService orderDomainService) { _orderDomainService = orderDomainService; } /// Handles a notification /// The notification /// Cancellation token public async Task Handle(OrderFinalManageNotify notification, CancellationToken cancellationToken) { var workflow = notification.Workflow; switch (workflow.ModuleCode) { case WorkflowModuleConsts.OrderManage: await _orderDomainService.FinalManageAsync(notification.Workflow.ExternalId, cancellationToken); break; } } } }