Closed justinoverton closed 4 years ago
Yes thanks for reporting this; this was a very recent change implemented in the last month or so. I just haven't been able to get around to addressing it yet due to the current health situation.
Oh hey, I just realised the nuget package isn't on the README. The last stable release (which doesn't yet include enum generation), is on Nuget: https://www.nuget.org/packages/LinqToXsdCore
Hello, I believe I have fixed this particular issue; there is one more outstanding bug with enum generation, but for this one I believe it is fixed in https://github.com/mamift/LinqToXsdCore/commit/992b7393a0e7f5e6106eb46e326c817f97ca7e33
I noticed that enum generation is not working when the restriction is an anonymous type of an attribute.
The atom.xsd will show the issue because the textType's type attribute is generated as a string instead of an enum.
Part of it is within XsdToTypesConverter.cs BuildProperty for attribute where name of the type is set to he name of the attribute
Then later in TypesToCodeDom.cs ProcessProperties enum is only generated if it is an anonymous type: