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) { } }
/// <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); }