简体   繁体   English

如何重命名XSD.exe生成的枚举ItemsChoiceType?

[英]How to rename enum ItemsChoiceType generated by XSD.exe?

When you are generating c# class from XSD any choice will be represented as enum. 从XSD生成c#类时,任何选择都将表示为枚举。 And i didn't find any way to make this name custom. 而且我没有找到任何使该名称自定义的方法。 The problem is that when i'm using 2+ choices in xsd generator will produce ItemsChoiceType , ItemsChoiceType1 , etc. And this can break naming compatibility. 问题是,当我在xsd生成器中使用2+选项时,将生成ItemsChoiceTypeItemsChoiceType1等。这可能会破坏命名兼容性。

Is it possible to set custom name instead of ItemsChoiceType ? 是否可以设置自定义名称而不是ItemsChoiceType

That name is defined into the XSD, if you do not hace chance to edit the XSD is not posible ... 该名称已定义到XSD中,如果您没有机会编辑XSD是不可能的...

( is it an model enumeration? https://msdn.microsoft.com/en-us/library/Vstudio/bb347480(v=vs.90).aspx ) (这是模型枚举吗? https://msdn.microsoft.com/zh-cn/library/Vstudio/bb347480(v=vs.90 ) .aspx

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

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