CQRSMicroservices.Framework.CommandBus.Dispatch C# (CSharp) 메소드

Dispatch() 공개 메소드

public Dispatch ( Command command ) : System.Threading.Tasks.Task
command Command
리턴 System.Threading.Tasks.Task
    public async Task Dispatch(Command command)
    {
      CommandHandler handler;
      if(_handlers.TryGetValue(command.GetType(), out handler))
      {
        await handler.Handle(command);
      }
      else
      {
        throw new NotImplementedException($"No handler for commandtype {command.GetType().FullName}");
      }
    }