I am trying to do a string literal check using Flee, but I cannot get it to work, when I specify the string value I am trying to check it attempts to use a variable instead. Here's ny code:
var context = new ExpressionContext();
context.Variables.DefineVariable("User", typeof(User));
const string exp = @"(User.UserName = JWilly)";
var expression = context.CompileDynamic(exp);
var user = new User
{
Id = 1,
UserName = "JWilly",
Active = false,
};
context.Variables["User"] = user;
var result = expression.Evaluate();