예제 #1
0
        private static void createMethod(
            MethodAttributesInfo methodInfo,
            RestRequest request,
            dynamic expando)
        {
            string methodName = methodInfo.Method.Name;

            var parameterFunctions = methodInfo.ParameterAttributes.Select(p => createParamAttrFunction(p));

            //first all method attributes
            foreach (var mAttr in methodInfo.Attributes)
            {
            }
        }
예제 #2
0
        /// <summary>
        /// Get all method and parameter attributes for a given MethodInfo.
        /// </summary>
        /// <param name="method">The given MethodInfo.</param>
        /// <returns>The MethodAttributesInfo containing all method and parameter attributes.</returns>
        private static MethodAttributesInfo parseMethodAttributes(MethodInfo method)
        {
            MethodAttributesInfo methodAttributes = new MethodAttributesInfo();

            methodAttributes.Method = method;

            methodAttributes.Attributes          = method.CustomAttributes;
            methodAttributes.ParameterAttributes = from param in method.GetParameters()
                                                   select new ParameterAttributeInfo()
            {
                Parameter = param, Attributes = param.CustomAttributes
            };

            return(methodAttributes);
        }