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

SerializerCodeGenerationConfiguration.IsRecursive doesn't track generic type #106

Closed
neuecc opened this issue Aug 10, 2015 · 2 comments
Closed
Labels
enhancement Requires or request to feature enhancement

Comments

@neuecc
Copy link

neuecc commented Aug 10, 2015

If recursive type in generic(array, list, dictionary, etc...),
SerializerCodeGenerator doesn't generate generic element type.

var settings = new SerializerCodeGenerationConfiguration
{
    IsRecursive = true,
};
var codes = SerializerGenerator.GenerateCode(settings, typeof(A_Class));

foreach (var item in codes)
{
    // only A_ClassSerializer but my expected is generates A_ClassSerializer and B_ClassSerializer
    Console.WriteLine(item);
}
public class A_Class
{
    public B_Class[] Prop_B { get; set; }
}

public class B_Class
{
    public int MyProperty { get; set; }
}
@yfakariya yfakariya added the enhancement Requires or request to feature enhancement label Aug 11, 2015
@yfakariya
Copy link
Member

Thank you for reporting.
I agree the element type and generic arguments should also be targeted.

yfakariya added a commit that referenced this issue Aug 15, 2015
…neration. Issue #106.

This commit add support for element types of arrays and generic arguments in recursive serializer generation.
@yfakariya
Copy link
Member

Fixed in 0.6.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Requires or request to feature enhancement
Projects
None yet
Development

No branches or pull requests

2 participants