C# 可以直接从代码生成类图的程序

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/15902914/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-10 18:23:15  来源:igfitidea点击:

Program which can produce class diagrams directly from code

c#importumldocumentation-generationclass-diagram

提问by John Magistr

I have a somewhat large C# project which I am starting to lose overview of. I was wondering if there was some software out there which could graphically represent my classes, which calls what, and so forth.

我有一个有点大的 C# 项目,我开始失去对它的概述。我想知道是否有一些软件可以以图形方式表示我的类,调用什么等等。

I have tried googling around a little, but only found old software and Visual Studio extensions which did not enable for a direct import to output function.

我试过用谷歌搜索一下,但只发现旧软件和 Visual Studio 扩展无法直接导入到输出功能。

Suggestions welcome :-)

欢迎提出建议:-)

Regards, John

问候, 约翰

采纳答案by ken2k

You could use the built-in "class diagram" file type of Visual Studio.

您可以使用 Visual Studio 的内置“类图”文件类型。

Add a new class diagram to your project :

向您的项目添加一个新的类图:

Add -> New Item -> Class diagram

Then drag and drop your classes to the diagram files:

然后将您的类拖放到图表文件中:

enter image description here

在此处输入图片说明

回答by alex

Doxygenwill generate beautiful hypertext diagrams from source code even for large projects. It uses graphviz library to draw the diagrams and provides an html help as an output. It works well for C-like languages.

即使对于大型项目,Doxygen也会从源代码生成漂亮的超文本图。它使用 graphviz 库来绘制图表并提供 html 帮助作为输出。它适用于类 C 语言。