public override void Interpret(IContext context) { ExpressionA.Interpret(context); ExpressionB.Interpret(context); var result = context.Get(ExpressionA).Equals(context.Get(ExpressionB)); context.AddVariable(this, result); }
public override void Interpret(IContext context) { ExpressionA.Interpret(context); ExpressionB.Interpret(context); var result = (bool)context.Get(ExpressionA) || (bool)context.Get(ExpressionB); context.AddVariable(this, result); }
public override void Interpret(IContext context) { ExpressionA.Interpret(context); ExpressionB.Interpret(context); var exprAresult = context.Get(ExpressionA); var exprBResult = context.Get(ExpressionB); var resultA = exprAresult as string; var resultB = exprBResult as string; if (resultA != null && resultB != null && resultA.IndexOf(resultB, StringComparison.Ordinal) != -1) { context.AddVariable(this, true); return; } context.AddVariable(this, false); }