-
Notifications
You must be signed in to change notification settings - Fork 101
Closed
Labels
Description
Receiving a list of variables is helpfull, but it would be great if instead of this
var eval = new ExpressionEvaluator(variables);
the library could receive an object which would be the context. (similar to what roslyn does)
var eval = new ExpressionEvaluator(Person1);
then all the properties, variables and methods would be directly accessible
eval.Evaluate(" Name + \" \" + LastName ");
eval.Evaluate(" aPersonMethod() + 10");
where Person1 is an instance of the class
public class Person{
public string Name {get;set;}
public string LastName {get;set;}
public int aPersonMethod(){
return 10;
}
}