Skip to content

v2.4.21

Choose a tag to compare

@JonathanMagnan JonathanMagnan released this 20 Mar 18:30
· 204 commits to master since this release
f3e95c8

Download the library here

ADDED: VariableFactory event (Assign variable value on the fly)

var context = new EvalContext();

context.VariableFactory = arg =>
{
    var name = arg.Name;
    if (name == "X")
    {
        arg.Value = 2;
        arg.IsHandled = true;
    }
    else if (name == "Y")
    {
        arg.Value = 3;
        arg.IsHandled = true;
    }
};

var r = context.Execute("X + Y");

Trial unlocked for the current month (March)