Skip to content

Releases: zzzprojects/Eval-Expression.NET

v2.1.13

02 Aug 15:39
Compare
Choose a tag to compare

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

01 Aug 17:09
Compare
Choose a tag to compare

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

27 Jul 16:15
Compare
Choose a tag to compare

Download the library here

FIXED: issue with generic anonymous type constructors (Issue #10)
FIXED: Issue with ?. operator and class

PRO Version unlocked for the current month (August)

v2.1.10

25 Jul 14:50
Compare
Choose a tag to compare

Download the library here

PRO Version unlocked for the current month (August)

v2.1.9

11 Jul 18:59
Compare
Choose a tag to compare

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

10 Jul 14:56
Compare
Choose a tag to compare

Download the library here

FIXED: Cast with null value

var value = Eval.Execute("(string)null");

PRO Version unlocked for the current month (July)

v2.1.7

07 Jul 11:38
Compare
Choose a tag to compare

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

06 Jul 15:03
Compare
Choose a tag to compare

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

03 Jul 18:02
Compare
Choose a tag to compare

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

29 Jun 17:34
Compare
Choose a tag to compare

Download the library here

PRO Version unlocked for the current month (July)