예제 #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
 public IConcordionExtender WithExceptionListener(IExceptionCaughtListener listener)
 {
     ExceptionListeners.Add(listener);
     return(this);
 }