xml层级工具_.NET的类型层次查看工具,ClassHierarchyViewer,0.3.0.1

上周为了快速了解一个.NET的库而需要查看其类型层次。假如要在文章中表示一个类型层次,还是用文本比较舒服,截图始终是不方便。Reflector虽然能够显示类型层次,但我无法方便的把显示出来的类型层次转换为文本形式。而且,Reflector在显示基类和派生类的时候都会使用类型的全名,但有时候我只需要看到类型的简单名字。我也找过另外几个工具,例如.NET Framework SDK以前自带的Windows 窗体类查看器(Wincv.exe),但它只显示类型自身的信息以及基类的信息,而不显示派生类的信息,还是不够用。

没找到现成合用的工具,只好自己写一个了。于是就用C#/WinForms写了一个简单的GUI程序,只是用来显示类型层次信息,并且能把类型层次以文本形式复制到剪贴板。

截图一张:

对应这张截图得到的文本表示:

IList

Collection

KeyedCollection

List

ReadOnlyCollection

开源形式:

该程序采用MIT形式的许可证开放源代码。程序与源码可在下面链接的压缩包中获得。

下载地址

运行环境:

由于使用了LINQ,这个程序需要.NET Framework 3.5才能正常运行。如果需要移植到.NET Framework 2.0的话,可以使用Mono的System.Core.dll的实现。

使用方法:

可以从命令行提供参数来打开assembly,格式为:

ClassHierarchyViewer

或者直接启动程序,并通过以下三种方式的任意一种来打开assembly:

1、在文本框中输入assembly的完整名称(Name,Version,Culture,PublicKeyToken),并按回车或点击“Load By Name”按钮;

2、按“Open File...”按钮通过对话框选取assembly;

3、从文件浏览器把assembly拖放到该程序的窗口里。

同一时间只会有一个assembly显示在窗口中。

其它功能应该不言而喻了,我就直接把readme文件的内容帖出来吧:

Name: ClassHierarchyViewer

Author: RednaxelaFX (Kris Mok,rednaxela0607@hotmail.com)

Version: 0.3.0.1

Release Date: 2008-09-23

License: MIT style license. See License.txt.

Description:

A simple tool that shows the class hierarchy within a given

.NET assembly.

Required Environment:

Windows XP or Vista, with .NET Framework 3.5 or above installed.

Usage:

1. Start program from command line:

usage: ClassHierarchyViewer

- or -

2. Start program from GUI:

Assemblies can be loaded by one of:

* enter the assembly's full name in the combobox, then click

"Load By Name" button;

* enter the assembly's full name in the combobox, and hit

Enter;

* Click "Open File..." button, and choose an assembly file;

* Drag and drop a assembly file from Explorer.

Only one assembly is active at a time.

A few commonly used BCL assemblies' names are added to the

combox already, including:

mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

System.AddIn, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a

System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

System.Data.Entity, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

System.Deployment, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a

System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a

System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a

System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a

System.Drawing.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a

System.Messaging, Version=2.0.0.0, Culture=neutral, PublicKeyToken=969db8053d3322ac

System.Net, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a

System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a

System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089

Functions:

The GUI window is divided into 3 major components:

1. Class List Window (on the left)

Displays all types (except "") in the given assembly,

grouped by their namespaces, sorted by the type's name.

Types that are not visible outside the assembly are marked gray.

2. Class Hierarchy Window (on the upper right)

When a type is selected in the Class List Window, its type

hierarchy will be shown in this window.

The hierarchy shown includes the type itself, its base type (up

to System.Object), and all its derived types.

Checking/unchecking the "Full Name" checkbox will cause this

window to reload, showing types with their simple name/full name.

Clicking "Copy to Clipboard" button will copy the type hierarchy

to the clipboard, in text representaion.

3. Class Member Window (on the lower right)

When a type is selected in the Class Hierarchy Window, its

members will be shown in this window. This does not include

a type's nested types.

Checking/unchecking the "Use Alias" checkbox will cause this

window to reload, showing types with their alias/name.

Known Issues:

1. TreeViews flicker when mouse moves over them rapidly.

Haven't found any solution to this, maybe that's just how

WinForms behaves.

2. Copying the type hierarchy causes flickering.

This is because of the way data is loaded: derived types are

added onto the tree when a node is expanded. To make sure

derived types are added correctly, the whole tree is expanded

before its text representation can be gathered. This will be

improved in later versions with M-V-VM pattern.

3. Properties' getter and setter methods aren't associated with

the properties' nodes.

Due to the lack of developing time, certain useful functions

such as this one is not implemented yet. Will be fixed in

later versions.

4. Doesn't show what interfaces a type implements.

Same as above. Will be fixed.

5. Cannot load an assembly from GAC just by browsing in the open

file dialog.

I know. That's why there's an alternative, to load assemblies

with their full names. Later on I might add a dialog to select

assemblies from GAC.

Note:

The icons used in this program originated from Microsoft Visual

Studio 2008's image libraries, Visual Studio Image Library:

24bit Objects and Objects (WinVista style, .png).[/quote]

许可证:

The MIT License

Copyright (c) 2008 RednaxelaFX (Kris Mok,rednaxela0607@hotmail.com)

Permission is hereby granted, free of charge, to any person obtaining a copy

of this software and associated documentation files (the "Software"), to deal

in the Software without restriction, including without limitation the rights

to use, copy, modify, merge, publish, distribute, sublicense, and/or sell

copies of the Software, and to permit persons to whom the Software is

furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in

all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR

IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,

FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE

AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER

LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,

OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN

THE SOFTWARE.

现在这个简陋的程序最大的限制就是无法自如的打开GAC里的assembly,因为在Windows上安装.NET Framework之后,GAC目录默认会被Fusion管理起来,需要通过修改注册表来禁用这个功能才能看到GAC里的assembly的路径。当然,我可以扫描%WINDOWS%\Assembly\下的所有assembly,不过这个功能还没做进来;别的类似程序在扫描GAC时非常慢,所以我不太肯定要不要把这个功能做进来。现在通过强名称一样能打开GAC里的assembly,只是用户会辛苦一点了。预先放在文本框的下拉列表里的名称应该能满足一般使用需要了吧。

如果有什么意见和建议,欢迎提出。有需要请通过站内短信或者电子邮件联系,谢谢 ^ ^

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/551274.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

XM7 FOR ANDROID,视频剪辑制作app-视频剪辑制作xm8.0安卓版-蜻蜓手游网

视频剪辑制作是一款很好用的手机视频编辑软件,在这里你可以进行视频剪辑、制作字幕、背景音乐制作等,让你可以轻松的制作视频,需要视频剪辑制作的就来蜻蜓手游网下载吧!软件功能【背景配乐】给视频添加背景音乐,支持MP…

css宋体代码_css中宋体怎么设置?

CSS 能够对网页中元素位置的排版进行像素级精确控制,支持几乎所有的字体字号样式,拥有对网页对象和模型样式编辑的能力。下面我们来看一下css设置宋体的方法。css设置宋体代码如下:div里面设置字体宋体样式全局设置字体样式font-family 规定元…

android极光推送声音,android 极光推送 声音与振动 的关闭和开启

前言:最近刚好在写一些推送方面的东西,又是新手,不断在网上找资料,很少,不过还是找到了一些,反正百度我是再也不想百度了,谷歌一下子就能找到想要的。废话不多说。1.主要方法就是如下一个函数pr…

linux禁止客户端上传文件_Linux 几种上传文件到linux服务的方法

Linux下几种文件传输命令 sz rz sftp scp最近在部署系统时接触了一些文件传输命令,分别做一下简单记录:1.sftpSecure Ftp 是一个基于SSH安全协议的文件传输管理工具。由于它是基于SSH的,会在传输过程中对用户的密码、数据等敏感信息进行加密&…

韩泰机器人_[视频]Hankook Mirae展示四米高的Method-2载人两足机器人

Method-2 身高 13 英尺(约合 4 米),重 1.5 吨。当它“走路”的时候,地面都会跟着一起震动。Hankook Mirae Technology 董事长 Yang Jin-Ho 表示:“Method-2 是全球首款载人双足机器人,它能够在人类难以企及的极端危险地带开展工作…

r语言的MASS包干什么的_R语言综述的包

Multivariate Statistics(多元统计)基本的R包已经实现了传统多元统计的很多功能,然而CRNA的许多其它包提供了更深入的多元统计方法,下面做个简要的综述。多元统计的特殊应用在CRNA的其它任务列表(taskview)里也会提及,如:排序(ord…

eps倾斜摄影矢量化采集毕业设计_eps倾斜摄影矢量化dlg采集

1、倾斜摄影测量倾斜摄影测量和我们传统影像的区别:从数据采集的方式来看,传统影像是通过飞机上搭载的航摄仪对地面连续摄取相片,而后经过一系列的内业处理得到的影像数据,获取的成果只有地物俯视角度信息,也就是视角垂…

在html中怎么写背景色渐变,css3背景色渐变

css3背景色渐变难是不难,就是麻烦。不同浏览器用法不同,还有个爱掺和的ie。。。一. Webkit浏览器(1) 第一种写法:background:-webkit-gradient(linear ,10% 10%,100% 100%,color-stop(0.14,rgb(255,0,0)),color-stop(0…

混凝土墙开洞_易县混凝土剪力墙切割常见问题

易县混凝土剪力墙切割常见问题北京专业切割 承接水泥地面切割路面切割 混凝土地面切割 地面切割开线槽 楼板切割 墙体切割 柱子切割 沥青地面切割 洋灰地面切割 切割开线槽 。是一个以建筑液压钳拆除结构加固和切割拆除、水钻钻孔的综合性公司。加固设计、混凝土外部粘钢加固、…

html中怎么写播放音乐格式,HTML+CSS入门 如何实现多浏览器播放wav格式的音频文件...

本篇教程介绍了HTMLCSS入门 如何实现多浏览器播放wav格式的音频文件&#xff0c;希望阅读本篇文章以后大家有所收获&#xff0c;帮助大家HTMLCSS入门。<使用audioplayer.js 基本上能支持大部分浏览器播放wav音频文件&#xff0c;经测试IE、火狐、google浏览器都可以播放编码…

差分放大电路差模共模公式_差分放大电路对差模信号和共模信号有什么影响?...

现在在应用中使用的放大电路一般都是由各级级联组成的&#xff0c;直接级联的放大电路各级的直流通路相互关联&#xff0c;因而当前级的静态工作点由于某种原因而稍有偏移时&#xff0c;这种缓慢的微小变化就会逐级影响&#xff0c;致使放大器的输出端产生较大的电压漂移&#…

html本地载入缓存文件,Flutter中如何加载并预览本地的html文件的方法

搜索热词直接进入主题&#xff0c;大概步骤如下在 assets 创建需要访问 html 文件&#xff0c;如下这里创建一个files文件夹&#xff0c;专门来放这些静态 html 文件.在 pubspec.yaml 中配置访问位置assets:- assets/images/- assets/files/在 pubspec.yaml 添加 webview_flutt…

三维数据平滑处理_关于CAD三维对象建模

下面是本公众号文章分类目录&#xff0c;点击标题文字可打开分类文章列表&#xff1a;安装卸载 异常、退出 文件及输入输出 基本操作技巧 设置及相关问题 界面和显示 快捷键 视图设置和调整 图层管理 颜色 线型 字体、文字样式和文字输入 标注、引线和标注样式 坐标系…

html下拉列表框的长度,HTML中如何定义下拉列表框的默认长度?

一共两个文件,html页面里面调用js文件就可以了,不是要把代码也复制到html文件里面^……联动菜单 是这个意思吗?实现方法很多 推荐一个比较好的:琥珀联动菜单以下信息为琥珀联动菜单&#xff1a;(在此感谢作者&#xff01;)下面是静态页面&#xff1a;HPMenu_Demo.html<html…

3蛋白wb_老司机手把手教你选WB内参

俗话说&#xff0c;一个生物学博士&#xff0c;要跑满1000面胶才能毕业。今天特邀实验室博三大师兄&#xff0c;和大家聊一聊WB内参那些小事。选择好合适并且好跑的内参&#xff0c;WB实验也就成功了一半。1. 什么是内参&#xff1f;内参即内部参照&#xff0c;一般是指由管家基…

制作支付页面弹框html,JS实现仿微信支付弹窗功能_蜡烛_前端开发者

先奉上效果图/p>body {margin: 0;padding: 0;font-size: 0.3rem;font-family: "微软雅黑", arial;}ul,li {margin: 0;padding: 0;list-style: none;}img {display: block;}#myBtn {display: block;width: 80%;height: auto;margin: 5rem auto;padding: 0.2rem;bor…

华为二层创建vlan_二层交换机不同VLAN实现互通 (华为)

1 &#xff0c;实验名称&#xff1a;二层交换机不同VLAN实现互通 (华为)2&#xff0c;实验环境&#xff1a;(1)PC1 PC2(2)二层交换机两台(3)三层交换机一台(路由功能)3&#xff0c;实验拓扑&#xff1a;2 配置步骤&#xff1a;(1)配置PC1&#xff1a;IP &#xff1a;192.168.10…

html 360不识别,html 为什么在ie里显示正常在360浏览器不正常呢?

匿名用户1级2016-07-19 回答需要ie和webkit类浏览器兼容css&#xff1a;.search_box {position: relative;width: 360px;overflow: visible;}.search_box * {margin: 0;padding: 0;list-style: none;font: normal 12px/1.5em "宋体", Verdana, Lucida, Arial, Helvet…

主板24pin接口详图_【图解】主板连线接口最详尽图文解释

【图解】主板连线接口最详尽图文解释我为人人&#xff0c;公益分享&#xff01;论坛地址&#xff1a;chayunyx.uueasy.cn本文结构&#xff1a;一、认识主板供电接口图解安装详细过程二、认识CPU供电接口图解安装详细过程三、认识SATA串口图解SATA设备的安装四、认识PATA并口图解…

matlab 判断鼠标按下_轻巧可爱,支持多设备——雷柏Ralemo Air1乐萌鼠标

手机可以连接显示器&#xff0c;变成桌面系统&#xff0c;iPadOS支持鼠标操作&#xff0c;越来越多的智能设备都可以做到轻办公的使用需求&#xff0c;而办公必不可少就是鼠标&#xff0c;如果说为了每个设备都配个鼠标未免有点太过奢侈&#xff0c;今天介绍一款造型独特&#…