Releases: zzzprojects/Eval-Expression.NET
v2.1.8
v2.1.7
Download the library here
FIXED: IsGenericType now should return correctly true when nullable type is used
public class AnotherClass
{
public object Value { get; set; }
public T GetValue<T>()
{
return (T) Value;
}
}
EvalManager.DefaultContext.RegisterType(typeof(AnotherClass));
// WAS not compiling before
var compiled = Eval.Compile<Func<AnotherClass, decimal?>>("GetValue<decimal?>()");
var result = compiled(new AnotherClass() {Value = 7m});
PRO Version unlocked for the current month (July)
v2.1.6
Download the library here
FIXED: Issue with generic method without prefix
public class AnotherClass
{
public object Value { get; set; }
public T GetValue<T>()
{
return (T) Value;
}
}
EvalManager.DefaultContext.RegisterType(typeof(AnotherClass));
// WAS not compiling before
var compiled = Eval.Compile<Func<AnotherClass, string>>("GetValue<string>()");
var result = compiled(new AnotherClass() {Value = "23"});
PRO Version unlocked for the current month (July)
v2.1.5
Download the library here
FIXED: When an object is passed as parameter, property & field will now be used directly instead of creating a variable with the value and using it.
public class MyEntity
{
public int ID { get; set; }
}
var entity = new MyEntity();
// BEFORE change
var x1 = Eval.Execute("ID = 5", entity);
// x1 = 5, entity.ID = 0
// AFTER change
var x1 = Eval.Execute("ID = 5", entity);
// x1 = 5, entity.ID = 5
PRO Version unlocked for the current month (July)
v2.1.4
v2.1.3
Download the library here
FIXED: Issue with typeof(). Some additional expression was taked by the typeof. (Issue #9)
var test = Eval.Execute(@"var lst = typeof(System.Collections.Generic.List<System.Collections.Generic.List<System.String>>);
return lst;");
PRO Version unlocked for the current month (June)
v2.1.2
v2.1.1
Download the library here
FIXED: Full namespace used in Generic Type (Issue #7)
Example:
var context = new EvalContext();
context.RegisterType(typeof(System.Collections.Generic.List<>));
context.RegisterType(typeof(string));
//Not Error
var xx2 = context.Compile<Func<System.Collections.Generic.List<System.String>, object>>(@"
var lst = new System.Collections.Generic.List<List<System.String>>();
return lst;", "reader");
//Error
var xx = context.Compile<Func<System.Collections.Generic.List<System.String>, object>>(@"
var lst = new System.Collections.Generic.List<System.Collections.Generic.List<System.String>>();
return lst;", "reader");
PRO Version unlocked for the current month (June)
v2.1.0
v2.0.9
Download the library here
FIXED: Method overload resolution when with normal && expanded expression.
Example
Was resolved with Eval.Execute(this string, param object[]) method instead of Eval.Execute(this string, object) method
Dictionary<string, object> Values = new Dictionary<string, object>() { { "value1", 20.35 }, { "value2", 61.48 } };
double result1 = Eval.Execute<double>(@" double result1 = Eval.Execute<double>(@'value1 + value2', Values);
", new { Values = Values });
PRO Version unlocked for the current month (May)