예제 #1
0
        private void bw_DoWork(object sender, DoWorkEventArgs e)
        {
            TreeNode node = Node;

            var children = new List <TreeNode>();

            if (node == _treeViewHandler.RefNode || node.Tag is AssemblyRef) // Assembly Reference
            {
                var referenceHandler = new ReferenceHandler(_treeViewHandler);
                referenceHandler.ProcessAssemblyRefs(out children);
            }
            else if (node.Tag is ModuleDefMD) // Module
            {
                foreach (TypeDef type in (node.Tag as ModuleDefMD).Types.OrderBy(t => t.Name.ToLower()))
                {
                    new TypeHandler(_treeViewHandler).HandleType(type, true);
                }
            }
            else if (node.Tag is TypeDef) // Type
            {
                new TypeHandler(_treeViewHandler).ProcessTypeMembers(node, ref children);
            }

            Node     = node;
            e.Result = new object[] { children.ToArray() };
        }
예제 #2
0
        private void bw_DoWork(object sender, DoWorkEventArgs e)
        {
            TreeNode node = Node;

            var children = new List<TreeNode>();

            if (node == _treeViewHandler.RefNode || node.Tag is AssemblyRef) // Assembly Reference
            {
                var referenceHandler = new ReferenceHandler(_treeViewHandler);
                referenceHandler.ProcessAssemblyRefs(out children);
            }
            else if (node.Tag is ModuleDefMD) // Module
            {
                foreach (TypeDef type in (node.Tag as ModuleDefMD).Types.OrderBy(t => t.Name.ToLower()))
                {
                    new TypeHandler(_treeViewHandler).HandleType(type, true);
                }
            }
            else if (node.Tag is TypeDef) // Type
            {
                new TypeHandler(_treeViewHandler).ProcessTypeMembers(node, ref children);
            }

            Node = node;
            e.Result = new object[] {children.ToArray()};
        }