我正在使用第 3 方 XSD 及其糟糕的东西。但是,所有枚举都没有正确反序列化,它们默认为第一个值。
这是其中一个枚举的示例
public enum LoanIdentifierBase
{
NotSet,
AgencyCase,
InvestorCommitment,
InvestorContract,
InvestorLoan,
InvestorWorkoutCase,
这是使用此枚举的类
public class LoanIdentifierEnum : BaseClass
{
[XmlAttribute("SensitiveIndicator")]
public bool SensitiveIndicator { set; get; }
[XmlIgnore]
public bool SensitiveIndicatorSpecified { set; get; }
[XmlAttribute(Form = XmlSchemaForm.Qualified, Namespace = "http://www.w3.org/1999/xlink", DataType = "NCName")]
public string label { set; get; }
[XmlAnyAttribute]
public XmlAttribute[] AnyAttr { set; get; }
public LoanIdentifierBase Values { set; get; }
}
我已经尝试了几个标签和排列,但无论我做什么,这些值都会返回为未设置。
这是与此相关的导入文件
