Exemplo n.º 1
0
        /// <summary>
        ///     TestMethodory method for returning a request processor
        /// </summary>
        /// <typeparam name="T">type of request</typeparam>
        /// <returns>request processor matching type parameter</returns>
        internal IRequestProcessor <T> CreateRequestProcessor <T>(Expression expression)
            where T : class
        {
            if (expression == null)
            {
                throw new ArgumentNullException("expression",
                                                "Expression passed to CreateRequestProcessor must not be null.");
            }

            string requestType = new MethodCallExpressionTypeFinder().GetGenericType(expression).Name;

            IRequestProcessor <T> req = CreateRequestProcessor <T>(requestType);

            return(req);
        }