/// <summary> /// Generates Data Services' method description which is convertable to JSON /// and can be consumed by clients /// </summary> public static MethodDescription FromMethodInfo(MethodInfoData data, IValueConverter valueConverter) { MethodDescription methDescription = new MethodDescription(data); //else Result is Converted to JSON System.Reflection.ParameterInfo[] paramsInfo = data.MethodInfo.GetParameters(); for (int i = 0; i < paramsInfo.Length; ++i) { ParamMetadata param = ParamMetadata.FromParamInfo(paramsInfo[i], valueConverter); param.ordinal = i; methDescription.parameters.Add(param); } return(methDescription); }
public MethodDescription(MethodInfoData data) { _methodData = data; parameters = new List <ParamMetadata>(); }