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

Request support for Dynamic Collections Types for ParseAsDelegate #90

Open
KRSatpute opened this issue Oct 15, 2018 · 1 comment
Open

Comments

@KRSatpute
Copy link

I am working with dynamic objects and so far managed the work around for objects but it is difficult to work with dynamically created collections.

Ex:
Type dynamicListType = typeof(List<>).MakeGenericType(AnotherDynamicInferredType)
var dynamicList = Activator.CreateInstance(dynamicListType);

Use case:

string expression = "object.Source == "Productions"";
var dynamicWhere = interpreter.ParseAsDelegate<Func<dynamicType, bool>>(expression, "object");
var result3 = (dynamicList).Where(dynamicWhere);

What I want:

Some way for ParseAsDelegate to figure out {AnotherDynamicInferredType}, {dynamicListType} and {dynamicList}

@davideicardi
Copy link
Member

Thanks for the suggestion @KRSatpute . Unfrotunately for now it is not possible. We should probably add a ParseAsDynamic or something similar. Of course pull requests are welcome 😄

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

No branches or pull requests

2 participants