Beispiel #1
0
        /// <summary>
        /// Builds handler object.
        /// </summary>
        /// <param name="handlerType">Type of handler.</param>
        /// <param name="proxy">Instance of IHandlerProxy.</param>
        /// <returns>Object.</returns>
        public object BuildHandler(Type handlerType, IHandlerProxy proxy)
        {
            if (!_supportedTypesCatalog.ContainsKey(handlerType))
            {
                throw new NotSupportedException($"Type {handlerType} is not supported");
            }

            return(_supportedTypesCatalog[handlerType].Invoke(proxy));
        }
Beispiel #2
0
 public TestHandler(IHandlerProxy proxy)
 {
 }