Introduction

The EvalContext instance allows customizing the context under which the code or expression is compiled.

Multiple methods & properties is available:

  • Disable the cache
  • Make member case insensitive
  • Register extension methods, types, constants, or variables

Example

// using Z.Expressions; // Don't forget to include this.
var context = new EvalContext();
context.RegisterExtensionMethod(typeof(Z.ExtensionMethods));

bool result = Eval.Execute("X.In(1, 2, 3)", new { X = 1 });