如何在 VS 2010 UML 类图参数化类型中为类型参数添加多个泛型类型约束?
namespace ConsoleApplication8
{
public class Foo<T>
where T : IFoo, IFoo2
{
public Foo(T fooThing)
{
}
}
public interface IFoo
{
string Name {get;}
}
public interface IFoo2
{
string Name2 {get;}
}
}
VS 2010 UML 类图设计器中的模板参数集合编辑器似乎不允许您向单个泛型类型参数添加多个约束。
(图像被拒绝,因为我没有足够的“声誉”点)
我错过了什么吗?基本上,我如何在 VS 2010 UML 类设计器中建模,像代码示例中那样的多个类型参数约束?
namespace ConsoleApplication8
{
public class Foo<T>
where T : IFoo, IFoo2
{
public Foo(T fooThing)
{
}
}
public interface IFoo
{
string Name {get;}
}
public interface IFoo2
{
string Name2 {get;}
}
}
The Template Parameter Collection Editor in VS 2010 UML class diagram designer, doesn't seem to allow you add multiple constraints to a single generic type parameter.
(image was rejected because I don't have enough "reputation" points )
Am I missing something? Basically, how do I model in VS 2010 UML Class Designer, multiple type parameter constraints like that in the code sample?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你是对的 - VS 无法显示这一点。 UI 只允许您选择一种约束类型。
You're correct - VS can't show that. The UI only lets you pick one constraining type.