public static MethodSignatureDTO FromMethod(MethodInfo method) { return(new MethodSignatureDTO() { ReturnType = TypeDTO.FromType(method.ReturnType), MethodName = method.Name, ParameterTypes = method.GetParameters().Select(t => TypeDTO.FromType(t.ParameterType)).ToArray() }); }
public SerializedObject(object obj) { type = TypeDTO.FromType(obj.GetType()); var methodSignatures = new List <MethodSignatureDTO>(); foreach (var method in obj.GetType().GetMethods()) { methodSignatures.Add(MethodSignatureDTO.FromMethod(method)); } methods = methodSignatures.ToArray(); }