Eval Expression.NET 1.0.15 Retail » Developer.Team

Eval Expression.NET 1.0.15 Retail

Eval Expression.NET 1.0.15 Retail
Eval Expression.NET 1.0.15 Retail | 159 kB


Use flexibility of an Eval function in C# to build great dynamic application. C# developer doesn't have any more to be jealous of jаvascript Eval!

Anonymous Type
Extension Methods
Generic Type
Lambda Expression
LINQ
And more...

int result = Eval.Execute<int>(@"
var list = new List<int>() { 1, 2, 3, 4, 5 };
return list.Where(x => x > X).Take(Y).Count();


Use a complete and fast compiler which support nearly everything.

Operator Precedence
Parenthesis
Pow Operator (2^^3 = 8)

// Anonymous Type
int result = Eval.Execute<int>("X + Y", new { X = 1, Y = 2} );

// Class Member
dynamic expandoObject = new ExpandoObject();
expandoObject.X = 1;
expandoObject.Y = 2;
int result = Eval.Execute<int>("X + Y", expandoObject);

// Dictionary Key
var values = new Dictionary<string, object>() { {"X", 1}, {"Y", 2} };
int result = Eval.Execute<int>("X + Y", values);

// Argument Position
int result = Eval.Execute<int>("{0} + {1}", 1, 2);


Execute dynamic string code

Improve your applications flexibility by executing code using the same C# Syntax.

Evaluate stored formula
Perform LINQ operations with string

int result = Eval.Execute<int>(@"
var list = new List<int>() { 1, 2, 3, 4, 5 };
return list.Where(x => x > X).Take(Y).Count();


Compile fast property getter/setter

Improve your code readability and maintainability with an easy-to-use and easy-to-understand API.

Access internal and private property
Avoid using slow reflection
Avoid making complex lambda expression

var customer = new Customer() { Name = "ZZZ" };

var nameGetter = Eval.Compile<Func<Customer, string>>("x.Name", "x");
var name = nameGetter(customer);


[/b]

[b] Only for V.I.P
Warning! You are not allowed to view this text.

Comments 1

JerryLia
JerryLia 10 July 2016 00:24
the key provided seems do not work!
please check it!
SiteLock