Skip to content

Releases: zzzprojects/Eval-Expression.NET

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)

v2.1.3

20 Jun 20:06
Compare
Choose a tag to compare

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

08 Jun 16:34
Compare
Choose a tag to compare

Download the library here

FIXED: Issue with a constructor using an optional parameter. More work will be done very soon to provide a better constructor overload support.

PRO Version unlocked for the current month (June)

v2.1.1

06 Jun 19:49
Compare
Choose a tag to compare

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

31 May 16:06
Compare
Choose a tag to compare

Download the library here

MOVED: Code has been migrated to VS2015 with Shared Project.

PRO Version unlocked for the current month (June)

v2.0.9

15 May 15:04
Compare
Choose a tag to compare

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)