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

Array Traversal Broken #54

Open
RupertAvery opened this issue Mar 11, 2016 · 0 comments
Open

Array Traversal Broken #54

RupertAvery opened this issue Mar 11, 2016 · 0 comments
Assignees
Labels
Milestone

Comments

@RupertAvery
Copy link

Given the following classes:

    public class Top
    {
        public Middle[] MiddleArray { get; set; }
    }

    public class Middle
    {
        public string Name { get; set; }
        public string Location { get; set; }
    }

       var test = new Top();
            test.MiddleArray = new Middle[]
            {
                new Middle {Name = "Place1", Location = "Location1" },
                new Middle {Name = "Place2", Location = "Location2" }
            };

This will generate an object graph, but the MiddleArray property will be an empty array.

After debugging, it looks like it fails the ruleSet PropertyInClassRuleSet, the expressionType is "ConsoleApplication1.Middle[]" and the dataMemberPropertyName is [0]. Since the return value of the GetProperties on an array returns the Array type properties, it fails.

@OmarElabd OmarElabd added the bug label Mar 12, 2016
@OmarElabd OmarElabd self-assigned this Mar 12, 2016
@OmarElabd OmarElabd added this to the Version 2.0 milestone Mar 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants