Releases: zzzprojects/Eval-Expression.NET
v2.1.13
Download the library here
FIXED: Support to Conditional Member Access ?.
for method added yesterday
var dates = new List<DateTime>() { DateTime.Now.AddYears(-2) };
var result = Eval.Execute("dates.All(d => d > DateTime.Now.AddYears(-3))", new { dates });
Assert.AreEqual(true, result);
PRO Version unlocked for the current month (August)
v2.1.12
Download the library here
ADDED: Support to Conditional Member Access ?.
for method
var dates = new List<DateTime>() { DateTime.Now.AddYears(-2) };
var result = Eval.Execute("dates.All(d => d > DateTime.Now.AddYears(-3))", new { dates });
Assert.AreEqual(true, result);
PRO Version unlocked for the current month (August)
v2.1.11
v2.1.10
v2.1.9
Download the library here
FIXED: Issue with iterating on type that doesn't inherit from IEnumerable directly
public class MyList
{
public ConcurrentDictionary<int, string> Names { get; set; }
}
var context = new EvalContext();
context.RegisterType(typeof(MyList));
var compiled = context.Compile<Func<MyList, string>>("var eCount = \"\"; foreach (var name in Names.Values) { eCount += name; } eCount;");
PRO Version unlocked for the current month (July)
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)