We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
I would like to do some mapping with the linq.dynamic package.
var expression = "new System.Collections.Generic.Dictionary<string, string>() { { \"First\", \"A\" }, { \"Second\", \"B\" } }[it]"; var lambda = DynamicExpressionParser.ParseLambda<string, string>(ParsingConfig.Default, true, expression); var compiled = lambda.Compile(); var input = "First"; var result = compiled(input);
in the parseLambda call I am getting this exception
System.Linq.Dynamic.Core.Exceptions.ParseException: 'Type 'System.Collections.Generic.Dictionary' not found'
any way to make this accessible or is there a better way to achieve this?
The text was updated successfully, but these errors were encountered:
You could try something like
var config = new ParsingConfig { CustomTypeProvider = new CustomTypeProvider(new[] { typeof(System.Collections.Generic.Dictionary<,>) }) };
And try to use this config instead of the default one.
Sorry, something went wrong.
Adding typeof(System.Collections.Generic.Dictionary<,> will probably not work, because the parser cannot understand the <> in the expression.
typeof(System.Collections.Generic.Dictionary<,>
<>
expression
I'm taking a look if this can be added easily.
yes thats right, it translates to smth like Dictionary`2 as a string which will then cause a syntax error when you call new on it
StefH
No branches or pull requests
Hi,
I would like to do some mapping with the linq.dynamic package.
in the parseLambda call I am getting this exception
any way to make this accessible or is there a better way to achieve this?
The text was updated successfully, but these errors were encountered: