コード例 #1
0
        private ConcordionBuilder WithApprovedCommand(string namespaceURI, string commandName, ICommand command)
        {
            var exceptionCatchingDecorator = new ExceptionCatchingDecorator(new LocalTextDecorator(command));

            ExceptionListeners.ForEach(exceptionCatchingDecorator.AddExceptionListener);
            ICommand decoratedCommand = exceptionCatchingDecorator;

            CommandRegistry.Register(namespaceURI, commandName, decoratedCommand);
            return(this);
        }
コード例 #2
0
        private ConcordionBuilder WithApprovedCommand(string namespaceURI, string commandName, ICommand command)
        {
            ExceptionCatchingDecorator ExceptionCatchingDecorator = new ExceptionCatchingDecorator(new LocalTextDecorator(command));

            ExceptionCatchingDecorator.ExceptionCaught += ExceptionRenderer.ExceptionCaughtEventHandler;
            ICommand decoratedCommand = ExceptionCatchingDecorator;

            CommandRegistry.Register(namespaceURI, commandName, decoratedCommand);
            return(this);
        }