Click here to Skip to main content
15,886,258 members

Comments by C. David Johnson (Top 2 by date)

C. David Johnson 24-Apr-18 18:27pm View    
To give you an idea of the scope of this one project when I used Visual Studios XSD app to convert the XSD to c# objects the single file was 75,000 lines of code and thats just classes and enums
C. David Johnson 24-Apr-18 18:24pm View    
OK you have changed quite a bit that will make the over all project I have compleatly unmanageable. this is a HUGE convoluted XML structure. there are literally 3752 total file in this one project folder.

When I added the XMLText over the Value/LoanIdentifierBase the serializer error I got was

Cannot serialize object of type 'Enums.LoanIdentifierEnum'. Consider changing type of XmlText member 'V331.Enums.LoanIdentifierEnum.Value' from
V331.EnumBase.LoanIdentifierBase to string or string array.

Because of the structure supplied by the vendor I can not change/refactor the classes. If it were not for the face that the enum value was located in a value position (and named value it most likely would not be a problem

JIC it was confusing before Here is the class

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 Value { set; get; }
}


And the ENUM

public enum LoanIdentifierBase
{
NotSet,
AgencyCase,
InvestorCommitment,
InvestorContract,
InvestorLoan,
InvestorWorkoutCase,
LenderCase,
LenderLoan
}