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

Issue: The option UseDynamicObjectClassForAnonymousTypes does not work correctly #164

Closed
yyjdelete opened this issue May 10, 2018 · 3 comments
Labels

Comments

@yyjdelete
Copy link
Contributor

yyjdelete commented May 10, 2018

When turn it on, just get an System.ArgumentException: 'Incorrect number of arguments for constructor'

https://github.com/StefH/System.Linq.Dynamic.Core/blob/master/src/System.Linq.Dynamic.Core/Parser/ExpressionParser.cs#L1159-L1202

The option is only used when not in UAP10_0, but the ctor with KeyValuePair<string, object>[] is only available in UAP10_0.

@yyjdelete yyjdelete changed the title Flag UseDynamicObjectClassForAnonymousTypes not really works? Option UseDynamicObjectClassForAnonymousTypes not really works? May 10, 2018
@StefH StefH changed the title Option UseDynamicObjectClassForAnonymousTypes not really works? Issue: The option UseDynamicObjectClassForAnonymousTypes does not work correctly May 11, 2018
@StefH
Copy link
Collaborator

StefH commented May 11, 2018

I'll investigate this issue.
Maybe you can write a unit-test to show this issue ?

@yyjdelete
Copy link
Contributor Author

yyjdelete commented May 11, 2018

This one is simple
DynamicExpressionParser.ParseLambda(new ParsingConfig { UseDynamicObjectClassForAnonymousTypes = true }, null, "new {1 AS Id}");

@StefH
Copy link
Collaborator

StefH commented Feb 26, 2020

Option removed.

@StefH StefH closed this as completed Feb 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants