using Kean.Domain.Stock.Commands; using Kean.Domain.Stock.Events; using System.Threading; using System.Threading.Tasks; namespace Kean.Domain.Stock.EventHandlers { /// /// 出库成功时,下发信息给AGV /// [EventHandlerIndex(9)] public sealed class AutoOutSuccessEventHandler_AGV : EventHandler { private readonly ICommandBus _commandBus; // 命令总线 /// /// 依赖注入 /// public AutoOutSuccessEventHandler_AGV( ICommandBus commandBus) { _commandBus = commandBus; } /// /// 处理程序 /// public override async Task Handle(AutoOutSuccessEvent @event, CancellationToken cancellationToken) { //SendAGVCommand command = new SendAGVCommand(); //command.Barcode = @event.Barcode; //command.Tag = @event.Tag; //command.Destination = @event.Destination; //command.Lines = @event.Lines; //await _commandBus.Execute(command, cancellationToken); } } }