如何使用标志枚举作为 SSIS 中自定义组件的属性?
我正在为 SSIS 编写一个自定义组件,其中我需要以下枚举作为我可以编辑的属性(需要选择多个值)。
[Flags]
public enum PermissionSettings : ushort
{
None = 0,
Groups = 1,
ADGroups = 2,
Users = 4,
Owner = 8,
OwnerGroup = 16,
PublicAccess = 32,
System = 64
}
到目前为止,我已经实现了可以通过 TypeConverter 在自定义组件中为 PermissionSettings 选择单个值,并设置自定义 SSIS 属性的 TypeConverter 属性。
如何启用选择多个属性?
我必须编写自定义 ui 编辑器吗?
I'm programming a custom component for SSIS in which I need the following Enum as a property I can edit (selection of multiple values is needed).
[Flags]
public enum PermissionSettings : ushort
{
None = 0,
Groups = 1,
ADGroups = 2,
Users = 4,
Owner = 8,
OwnerGroup = 16,
PublicAccess = 32,
System = 64
}
So far I have achieved that I can select a single value for PermissionSettings in my custom component via a TypeConverter and setting the TypeConverter property of the custom SSIS property.
How can I enable selecting multiple properties?
Do I have to write a custom ui editor?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
是的,我相信您确实必须编写自定义 UI。属性/属性页对话框实际上只理解单值属性。看一下脚本组件的 ReadOnlyVariables/ReadWriteVariables - 它们存储为逗号分隔的变量列表,而不是数组。
Yes, I believe you do have to write a custom UI. The properties/property pages dialogs really only understand single-valued properties. Take a look at the ReadOnlyVariables/ReadWriteVariables of the Script Component - they're stored as a comma-separated list of variables, not as an array.