C# 视觉和正向工程

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/26229/
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-02 10:48:48  来源:igfitidea点击:

Visio and Forward-Engineering

提问by juan

Do you know if I can use Visio to forward-engineer a sequence diagram into code (c#)?

您知道我是否可以使用 Visio 将序列图前向工程化为代码 (c#)?

Can it be done with Visio alone or do I need a plugin?

可以单独使用 Visio 完成还是需要插件?

What about other diagrams?

其他图呢?

采纳答案by Garo Yeriazarian

You have to get the Visio that for users of Visual Studio. See this link: Visio for Enterprise Architectsfor more details. The code generation capabilities are fairly weak and you might end up getting Visio into an inconsistent state. I know that Visio will let you forward and reverse engineer both code and databases, but both capabilities are very limited and I don't recommend doing it.

您必须获得适用于 Visual Studio 用户的 Visio。有关更多详细信息,请参阅此链接:Visio for Enterprise Architects。代码生成功能相当薄弱,您最终可能会使 Visio 进入不一致的状态。我知道 Visio 可以让您对代码和数据库进行正向和反向工程,但这两种功能都非常有限,我不建议这样做。

In my opinion, Visio is a diagramming tool and it should be treated as such.

在我看来,Visio 是一种图表工具,应该如此对待。

回答by Michael Craig

To the best of my knowledge, Visio can only forward-engineer code from class models.

据我所知,Visio 只能从类模型中转发工程代码。

As sequence diagrams only really show paths of communication between objects, I suspect that they do not contain the necessary information, except perhaps in trivial cases, for generating code.

由于序列图只真正显示对象之间的通信路径,我怀疑它们不包含生成代码所需的必要信息,除非在一些琐碎的情况下。

Objects with any sort of complex behaviour patterns are likely to involve changing run-time states, of which sequence diagrams aren't really capable of capturing.

具有任何类型的复杂行为模式的对象都可能涉及更改运行时状态,而序列图并不能真正捕捉到这些状态。

回答by Tone

Looks like the latest version of Sparx Systems Enterprise Architect can forward engineer sequence diagrams

貌似最新版的 Sparx Systems Enterprise Architect 可以转发工程师时序图

Sparx Systems Enterprise Architect

Sparx 系统企业架构师