Exemple #1
0
        //[PermissionCommandExcuteMethodFilterAttribute()]
        public virtual ICommandHandlerResult Execute(ICommandContext context, TestExceptionCommand command)
        {
            var root = context.GetAggregateRoot(2L, () => { return(new TestAggregateRoot()
                {
                }); });

            return(context.CreateResult(CommandHandlerStatus.Success));
            //context.WriteEventAndFlush(new[] { new TestEvent1() });
            //throw new Exception("this is on excetpion test");
        }
Exemple #2
0
        public void TestSendExcetionCommand()
        {
            var commandBus = ContainerContext.Current.ServiceLocator.Resolve <ICommandBus>();
            var cmd        = new TestExceptionCommand();
            var dic        = new Dictionary <string, object>();

            //commandBus.Send(cmd, dic);
            //dic["gg"] = cmd.CommandId;
            //commandBus.Send(new TestMyCommand() { }, dic);

            Console.ReadLine();

            Thread.Sleep(1000);
        }