You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've encountered a behaviour when some types are "stepped over" on class generation. Ot at least it seems so.
I apologize in advance for a bit of a messy test case. I got rid of everything I felt could be safely removed.
Consider the following scheme (let's call it Application.xsd). Essentially - we have an Application class with 3 complex fields.
When generated, T_Application class has the following properties: PhaseList - is an array of T_PhaseInfo, instead of an instance of T_PhaseList that wraps it StageList - an array of T_Stage, instead of T_StageList OptionList - an array of T_NameValue instead of T_OptionList.
This is a feature (enabled through XmlArrayItemAttribute). It allows you to skip the redundant intermediate class (which would have just a single collection property but not have collection semantics). In this sense, the C# collection class (e.g. T_PhaseInfo[]) represents the intermediate class of the XML Schema (e.g. T_PhaseList). Is there something you feel is missing due to this approach?
It seems that the root issue has been fixed between versions 2.0.434.0 and 2.0.444.0 of the library.
Serialized xml differed in structure for the older version so I had to change the classes manually, but classes produced by the newest version serialize correctly.
Sorry for taking your time and thank you for your help. Your library is an immense help.
I've encountered a behaviour when some types are "stepped over" on class generation. Ot at least it seems so.
I apologize in advance for a bit of a messy test case. I got rid of everything I felt could be safely removed.
Consider the following scheme (let's call it
Application.xsd
). Essentially - we have an Application class with 3 complex fields.There're the linked schemes:
TheCommonTypes.xsd
Task.xsd
Common.xsd
When generated, T_Application class has the following properties:
PhaseList
- is an array ofT_PhaseInfo
, instead of an instance ofT_PhaseList
that wraps itStageList
- an array ofT_Stage
, instead ofT_StageList
OptionList
- an array ofT_NameValue
instead ofT_OptionList
.Or, as an extract:
This seems to be an unexpected outcome.
Am I doing anything wrong there?
Thanks in advance.
Code used to generate the classes:
The text was updated successfully, but these errors were encountered: