예제 #1
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="handlerFactory">The request handler factory</param>
        public AbstractApiController(
            IHandlerFactory handlerFactory)
        {
            handlerFactory.NotNull(nameof(handlerFactory));

            _handlerFactory = handlerFactory;
        }
예제 #2
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="logger">The logger</param>
        /// <param name="handlerFactory">The message handler factory</param>
        /// <param name="rethrowExceptions">Indicates whether or not the exception should be rethrown</param>
        public HandlerShell(
            ILog logger,
            IHandlerFactory handlerFactory,
            bool rethrowExceptions = true)
        {
            logger.NotNull(nameof(logger));
            handlerFactory.NotNull(nameof(handlerFactory));

            _logger         = logger;
            _handlerFactory = handlerFactory;

            RethrowExceptions = rethrowExceptions;
        }