private static TypeMetadata EmitReturnType(MethodBase method) { MethodInfo methodInfo = method as MethodInfo; if (methodInfo == null) { return(null); } return(TypeMetadata.EmitReference(methodInfo.ReturnType)); }
public static List <PropertyMetadata> EmitProperties(Type type) { //use binding flags to get not only public stuff List <PropertyInfo> props = type .GetProperties(BindingFlags.NonPublic | BindingFlags.DeclaredOnly | BindingFlags.Public | BindingFlags.Static | BindingFlags.Instance).ToList();// return(props.Where(t => t.GetGetMethod().GetVisible() || t.GetSetMethod().GetVisible()) .Select(t => new PropertyMetadata(t.Name, TypeMetadata.EmitReference(t.PropertyType))).ToList()); }
private static List <ParameterMetadata> EmitParameters(MethodBase method) { return(method.GetParameters().Select(t => new ParameterMetadata(t.Name, TypeMetadata.EmitReference(t.ParameterType))).ToList()); }