Exemplo n.º 1
0
        MemberInfo[] IAssemblyView.GetTypeSelectedMembers(Type type)
        {
            List <MemberInfo> mems = new List <MemberInfo>();

            AssemblyView_AssemblyOnly_TreeNode asmNode = null;

            foreach (AssemblyView_AssemblyOnly_TreeNode node in Nodes)
            {
                if (node.Assembly == type.Assembly)
                {
                    asmNode = node;
                    break;
                }
            }
            TreeNode   asmSubNode = type.IsPublic ? asmNode.Nodes[Resources.strPublicType] : asmNode.Nodes[Resources.strNonPublicType];
            MemberTree tree       = GetAllMembers(type);

            foreach (TreeNode classNode in asmSubNode.Nodes)
            {
                foreach (TreeNode cate1Node in classNode.Nodes)
                {
                    foreach (TreeNode cate2Node in cate1Node.Nodes)
                    {
                        if (cate2Node.Checked)
                        {
                            mems.AddRange(tree.GetMembers(cate1Node.Name, cate2Node.Name));
                        }
                    }
                }
            }
            return(mems.ToArray());
        }
Exemplo n.º 2
0
        DocumentBuilderMember[] IAssemblyView.GetTypeMembers(Type type)
        {
            List <DocumentBuilderMember> mems = new List <DocumentBuilderMember>();

            AssemblyView_AssemblyOnly_TreeNode asmNode = null;

            foreach (AssemblyView_AssemblyOnly_TreeNode node in Nodes)
            {
                if (node.Assembly == type.Assembly)
                {
                    asmNode = node;
                    break;
                }
            }
            TreeNode   asmSubNode = type.IsPublic ? asmNode.Nodes[Resources.strPublicType] : asmNode.Nodes[Resources.strNonPublicType];
            MemberTree tree       = GetAllMembers(type);

            foreach (TreeNode classNode in asmSubNode.Nodes)
            {
                foreach (TreeNode cate1Node in classNode.Nodes)
                {
                    foreach (TreeNode cate2Node in cate1Node.Nodes)
                    {
                        foreach (MemberInfo member in tree.GetMembers(cate1Node.Name, cate2Node.Name))
                        {
                            mems.Add(new DocumentBuilderMember(cate1Node.Checked, member));
                        }
                    }
                }
            }
            return(mems.ToArray());
        }
Exemplo n.º 3
0
        private void AddAssemblyObjects(Assembly asmFile)
        {
            TreeNode node    = null;
            TreeNode asmNode = new AssemblyView_AssemblyOnly_TreeNode(asmFile);

            node                  = new TreeNode(Resources.strPublicType);
            node.Name             = Resources.strPublicType;
            node.ImageKey         = Resources.strPublicType;
            node.SelectedImageKey = Resources.strPublicType;
            AddSubNodes(node);
            asmNode.Nodes.Add(node);

            node                  = new TreeNode(Resources.strNonPublicType);
            node.Name             = Resources.strNonPublicType;
            node.ImageKey         = Resources.strNonPublicType;
            node.SelectedImageKey = Resources.strNonPublicType;
            AddSubNodes(node);
            asmNode.Nodes.Add(node);
            this.Nodes.Add(asmNode);
        }