简体   繁体   English

Visual Studio 2013中的同步UML类图和代码

[英]Synchronization UML class diagram and Code in visual studio 2013

我已经创建了UML类图并生成了类和代码,但是我需要在类(新方法,成员)中添加更多代码,并且需要同步旧的UML类图和代码。

You can use partial class for that. 您可以使用部分类。 Write any new methods/properties in a separate partial class so that it doesn't get overridden when you sync the other partial class with the class diagram. 在单独的局部类中编写任何新的方法/属性,以便在将另一个局部类与类图同步时不会被覆盖。

Partial class splits the class into separate files. 局部类将类拆分为单独的文件。

http://msdn.microsoft.com/en-us/library/wa80x488.aspx http://msdn.microsoft.com/zh-CN/library/wa80x488.aspx

如果您在Visual Studio(.cd文件)中创建了一个类图,它将自动更新。

I added a method in class that I generated from the class diagram, and this method not added to a class diagram. 我在类中添加了一个从类图生成的方法,而该方法未添加到类图。 Maybe there is a setting to sync? 也许有要同步的设置?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM