Support for IndexExpression
See original GitHub issueIs your feature request related to a problem? Please describe.
I have an expression that uses a dictionary. But I can’t serialize it as Serialize.Linq do not support IndexExpression.
Describe the solution you’d like
Suport for IndexExpression
so that something like:
Expression<Func<Dictionary<string,string>, bool>> filterExpression = filter => (int)Convert.ChangeType(filter["Age"], typeof(int)) < 10;
can be serialized.
Background
I’m building a messaging system where developers may filter messages using LINQ expressions.
A dev might use something like: subscription.Filter<MyDTO>(x => x.Age < 10)
.
But since the messaging system doesn’t have access to the assembly that the MyDTO
type is located in I’m transforming the expression to use a Dictionary<string,string>
instead before transferring the expression to the messaging system.
That’s why I have wierd looking expressions 😃
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:8 (4 by maintainers)
Top GitHub Comments
It works fine. Thank you for the help!
yes, I will check tomorrow. thanks!