VS2010类图-如何显示两个接口之间的集合关联?
我正在从现有代码生成一些类图以改进文档,但我遇到了一些障碍。我想在图表上显示集合关联,但对于接口来说这似乎不可能。
如果接口位于另一个程序集中,则集合类型以其无界形式显示(例如 ReadOnlyObservableCollection
1`),并且尝试显示集合关联会给出错误
这不是有效的类型名称。
如果接口位于同一程序集中,则集合类型以其有界形式显示(例如 ReadOnlyObservableCollection`),但尝试显示关联时会出现错误消息
无法显示关联,因为找不到。
有什么想法我做错了吗,或者这只是 VS 类图的缺点?
谢谢, 詹姆斯
I'm generating some class diagrams from existing code to improve the documentation but I've run into a bit of an obstacle. I'd like to show collection associations on the diagram, but for interfaces this just doesn't seem possible.
If the interfaces are in another assembly, the collection type is displayed in its unbounded form (e.g. ReadOnlyObservableCollection
1`) and attempting to display collection associations gives the error
This is not a valid type name.
If the interfaces are in the same assembly, the collection type is displayed in its bounded form (e.g. ReadOnlyObservableCollection`), but attempts to display the associations come out with the error message
Cannot show an association because cannot be found.
Any ideas what I'm doing wrong, or is this just a shortcoming of VS class diagrams?
Thanks,
James
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我发现通过删除、删除并重新添加包含有问题的类的汇编的引用,解决了问题。
I found that by removing and removing and re-adding the reference of the assemble containing the offending class, solved the issue.