DynamicExpresso icon indicating copy to clipboard operation
DynamicExpresso copied to clipboard

Ability to set the context of the expression

Open davideicardi opened this issue 11 years ago • 1 comments

See http://stackoverflow.com/questions/23304321/ability-to-set-the-context-of-the-expression/23308125?noredirect=1#comment35753474_23308125

davideicardi avatar Apr 28 '14 17:04 davideicardi

Fixed by #233 ?

OwnageIsMagic avatar Jul 29 '22 15:07 OwnageIsMagic

Yes, it's fixed via #233, by setting a variable named "this". Full example:

var target = new Interpreter();
target.SetVariable("this", new { FirstName="Homer", LastName="Simpson"});
target.Eval("FirstName").Dump();

metoule avatar Aug 14 '22 15:08 metoule