using Kean.Domain.Message.Commands; using System.Collections.Generic; using System.Threading.Tasks; namespace Kean.Domain.Message.SharedServices { /// /// 出库 /// public sealed class SendMessage { private readonly ICommandBus _commandBus; /// /// 依赖注入 /// public SendMessage(ICommandBus commandBus) => _commandBus = commandBus; /// /// 处理程序 /// /// 托盘条码 /// 操作者 /// 标签 public Task Handler( string subject, int source, IEnumerable targets, string content) => _commandBus.Execute(new SendMessageCommand { Subject = subject, Source= source, Targets = targets, Content = content }); } }