为现有的源代码创建一个类图 [英] create a class diagram for existing source code

查看:80
本文介绍了为现有的源代码创建一个类图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我想为我现有的项目创建一个类图.

如何从Visual Studio 2008创建?

我听说有很多第三方工具可以用来创建类图.在这个中,它提供了清晰的信息,并且比其他工具要好?

Hi,


i want to create a class diagram for my existing project.

How can i create from visual studio 2008?

i heard so many third party tool is there to create a class diagram .in this which is giving clear information and better than the other tools?

推荐答案

您可以使用在线工具

单击此处
You can use the online tool

Click Here


如果您想编写自己的代码,可以使用反射.查看类型System.Type: http://msdn.microsoft.com/en-us/library/system.type.aspx [ ^ ].

它具有有关基本类型,属性,字段,构造函数,方法,属性等的全面信息.非公共成员也可以访问.这些方法的所有返回类型也都具有全面的信息.换句话说,您可以收集有关代码的全面元数据.这足以构建完整的类图.

对于图形表示,我不了解WPF.

实际上,我不知道真正好的图表实用程序. Visual Studio可以做到,但是对我来说使用它并不值得.它不符合UML表示法(也许还不错),而且重要的是,没有办法将其导入任何种类的矢量图形(为什么在地球上-我不知道!Microsoft可以完美地完成所有工作,例如XAML形式.)

另外,请查看Reflector, http://en.wikipedia.org/wiki/.NET_Reflector [ ^ ].

—SA
If you want to write your own code, you can use Reflection. Look at the type System.Type: http://msdn.microsoft.com/en-us/library/system.type.aspx[^].

It has comprehensive information on base type, properties, fields, constructors, methods, attributes, etc. Non-public members are also accessible. All return types of those methods also have comprehensive information. In other word, you can collect comprehensive meta-data about your code. This is more than enough to build a complete class diagram.

For graphics representation, I don''t know anything better then WPF.

Actually I don''t know really good diagramming utility. Visual Studio does it, but to me using it does not worth the effort. It does not comply UML notation (maybe this is not bad) and, importantly, there is no way to import it to any kind of vector graphics (why on Earth — I don''t know! Microsoft has everything to do it perfectly, in the form of XAML, for example).

Also, look at Reflector, http://en.wikipedia.org/wiki/.NET_Reflector[^].

—SA


直接在解决方案上单击鼠标右键,然后单击查看类图"
Simpily RightClick on the Solution an click View Class Diagram


这篇关于为现有的源代码创建一个类图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆