本文介绍了如何将属性限制为DSL模型中下拉列表的成员的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我正在使用Visual Studio建模SDK构建DSL,我的一个模型类需要有一个域属性,我只想从下拉列表中选择一个项目。 (我无法覆盖Microsoft.VisualStudio.Modeling.ElementNameProvider类,因为此属性不是名称)解决方案 事实证明,如果您右键单击DSL Explorer中的顶级项目,则会出现一个菜单添加新域枚举,该菜单会触发构建器以帮助您构建新的枚举类型模型已知,因此可用于域属性。 I am building a DSL using the Visual Studio modelling SDK and one of my model classes needs to have a domain property that I want to just be one of a selection of items from a drop-down list.(I can't override a Microsoft.VisualStudio.Modeling.ElementNameProvider class, as this property is not the name) 解决方案 It turns out that if you right-click the top level item in the DSL Explorer there is a menu "Add New Domain Enumeration" that fires a builder to help you build a new enumerated type that is known to the model and can therefore be used for domain properties. 这篇关于如何将属性限制为DSL模型中下拉列表的成员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-29 11:58