Unexpected Token (.)

Sep 17, 2011 at 10:01 PM

I have a generic function that returns various IEnumerable entities which I am trying expose through a lambda expression:




When I run it like this it throws the Unexpected Token (.) error:


expr = new ExprParser();
expr.ParameterType["_manager"] = Manager.Instance.GetType();
expr.ParameterValue["_manager"] = Manager.Instance;
var result = expr.Run("_manager.Data.GetEntities<SomeClass>()");


If I refactor it to this it works:

var thelist = Manager.Instance.Data.GetEntities<SomeClass>();
expr = new ExprParser();
expr.ParameterType["_thelist"] = thelist.GetType();
expr.ParameterValue["_thelist"] = thelist;
var result = expr.Run("_thelist");

Any ideas?


Sep 18, 2011 at 3:24 AM

Generic function has not fully supported yet. I will work on it and hopefully solve it in version 1.1.

Sep 20, 2011 at 2:53 AM

I put a new build (v1.1) as a planned release that can support generic class and method. you can find it from Download => Other Downloads(Planned) => Release v1.1.