private MethodMetadata(MethodBase method) { IsExpanded = false; m_Name = method.Name; m_GenericArguments = !method.IsGenericMethodDefinition ? null : TypeMetadata.EmitGenericArguments(method.GetGenericArguments().ToList()); m_ReturnType = EmitReturnType(method); m_Parameters = null; //EmitParameters(method.GetParameters()); m_Modifiers = EmitModifiers(method); m_Extension = EmitExtension(method); }
public TypeMetadata(Type type) { m_BaseType = null; IsExpanded = false; m_typeName = type.Name; m_DeclaringType = EmitDeclaringType(type.DeclaringType); m_Constructors = MethodMetadata.EmitMethods(type.GetConstructors()).ToList(); m_Methods = MethodMetadata.EmitMethods(type.GetMethods()).ToList(); m_NestedTypes = EmitNestedTypes(type.GetNestedTypes().ToList()).ToList(); m_ImplementedInterfaces = EmitImplements(type.GetInterfaces().ToList()).ToList(); m_GenericArguments = !type.IsGenericTypeDefinition ? null : TypeMetadata.EmitGenericArguments(type.GetGenericArguments().ToList()); m_Modifiers = EmitModifiers(type); m_BaseType = EmitExtends(type); m_Properties = null;//PropertyMetadata.EmitProperties(type.GetProperties()).ToList(); m_TypeKind = GetTypeKind(type); List <Attribute> Attributes; Attributes = type.GetCustomAttributes(false).Cast <Attribute>().ToList(); m_Attributes = new AtributeMetadata(Attributes); }