Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SerializerGenerator does not supports IList generation when IsRecursive = true #203

Closed
neuecc opened this issue Nov 25, 2016 · 2 comments
Closed
Labels
bug Detected as bug

Comments

@neuecc
Copy link

neuecc commented Nov 25, 2016

When invoke GenerateSerializerSourceCodes with IList<>, usually it works.
But if SerializerCodeGenerationConfiguration.IsRecrusive = true, throws excpetion.

repro code.

// Ok.
SerializerGenerator.GenerateSerializerSourceCodes(new[] { typeof(IList<int>) });

// Ng.
SerializerGenerator.GenerateSerializerSourceCodes(new SerializerCodeGenerationConfiguration() { IsRecursive = true }, new[] { typeof(IList<int>) });

exception message.

System.Runtime.Serialization.SerializationException: Cannot serialize type 'System.Collections.Generic.IList`1[System.Int32]' because it does not have any serializable fields nor
@yfakariya
Copy link
Member

Thank you for reporting. I will investigate and fix this.

@yfakariya yfakariya added the bug Detected as bug label Nov 29, 2016
yfakariya added a commit that referenced this issue Dec 4, 2016
… IsRecursive = true. #203

This commit fixes that the generator code does not use CollectionTrait to enumerate dependent types of collections.
@yfakariya
Copy link
Member

Fixed in 20ae0c3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Detected as bug
Projects
None yet
Development

No branches or pull requests

2 participants