/// <summary>
        /// Initializes a new instance of the <see cref="ExceptionDecorator{T}"/> class.
        /// </summary>
        /// <param name="logger">Logger</param>
        /// <param name="inner">The inner.</param>
        public ExceptionDecorator(IExceptionLogger logger, IHandlerOf <T> inner)
        {
            if (inner == null)
            {
                throw new ArgumentNullException("inner");
            }

            _logger = logger;
            _inner  = inner;
        }
 public DirectInvoker(IHandlerOf <T> handler)
 {
     _handler = handler;
 }
 public void Register <T>(IHandlerOf <T> handler) where T : Component
 {
     _handlers[typeof(T)] = new DirectInvoker <T>(handler);
 }
Ejemplo n.º 4
0
 public IHandlerOf <T> Create <T>(IHandlerOf <T> inner) where T : class, ICommand
 {
     return(new ValidationDecorator <T>(inner));
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="ValidationDecorator&lt;T&gt;"/> class.
 /// </summary>
 /// <param name="inner">The inner.</param>
 public ValidationDecorator(IHandlerOf <T> inner)
 {
     _inner = inner;
 }