v4.0.63
Download the library here
- UPDATED: Monthly Trial Release
- FIXED: The Enumerable.Intersect seems doesn't work for IEnumberable #117
- FIXED: Issue with short circuit operator when using implicit operator with class for
||and&& - FIXED:
AddMethodwhen creating dynamically an extension methods without additional parameters - ADDED:
RegisterKeywordto let people add their own custom keyword such as:
public class Program
{
public static void Main()
{
EvalManager.DefaultContext.RegisterExtensionMethod(typeof(CustomExtensions));
EvalManager.DefaultContext.RegisterKeyword("isin", "IsIn");
var list = new List<int>() { 1, 2, 3 };
Console.WriteLine(Eval.Execute("2 isin list", new { list }));
Console.WriteLine(Eval.Execute("4 isin list", new { list }));
}
}
public static class CustomExtensions
{
public static bool IsIn<T>(this T x, List<T> list)
{
return list.Contains(x);
}
}Fiddle: https://dotnetfiddle.net/2tu9ae
Trial unlocked until the end of December