public static List <PropertyMetadata> EmitProperties(Type type) { 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 TypeMetadata EmitReturnType(MethodBase method) { MethodInfo methodInfo = method as MethodInfo; if (methodInfo == null) { return(null); } TypeMetadata.StoreType(methodInfo.ReturnType); return(TypeMetadata.EmitReference(methodInfo.ReturnType)); }
private static List <ParameterMetadata> EmitParameters(MethodBase method) { return(method.GetParameters().Select(t => new ParameterMetadata(t.Name, TypeMetadata.EmitReference(t.ParameterType))).ToList()); }