Ejemplo n.º 1
0
 public MethodTreeViewItem(MethodMetadata methodMetadata, AllClases allClases)
 {
     all = allClases;
     this.methodMetadata = methodMetadata;
     if (methodMetadata.IsExpanded)
     {
         this.IsExpanded = true;
     }
 }
Ejemplo n.º 2
0
        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);
        }