Ejemplo n.º 1
0
        /// <inheritdoc />
        public ICommandResult Submit <TCommand>(TCommand command) where TCommand : class, ICommand
        {
            command.Requires(typeof(TCommand).FullName)
            .IsNotNull();

            var handler = handlerFactory.BuildHandler <TCommand>();

            handler.Requires(typeof(ICommandHandler <TCommand>).FullName)
            .IsNotNull();
            return(handler.Execute(command));
        }