protected override bool InternalEval(ILogicTermSource source) { var text = FirstIsLiteral ? source.Value(First) : First; var regex = SecondIsLiteral ? source.Value(Second) : Second; return(Regex.IsMatch(text, regex)); }
/// <summary> /// </summary> /// <param name="source"> </param> /// <returns> </returns> protected override bool InternalEval(ILogicTermSource source) { var resolvefst = FirstLiteral.StartsWith("$") ? FirstLiteral.Substring(1) : FirstLiteral; var resolvesec = SecondLiteral.StartsWith("$") ? SecondLiteral.Substring(1) : SecondLiteral; var fst = source.Value(resolvefst); var sec = source.Value(resolvesec); return(AreMatched(fst, sec)); }
/// <summary> /// </summary> /// <param name="source"> </param> /// <returns> </returns> protected override bool InternalEval(ILogicTermSource source) { return(AreMatched(source.Value(Literal), Value)); }
/// <summary> /// </summary> /// <param name="source"> </param> /// <returns> </returns> protected override bool InternalEval(ILogicTermSource source) { return AreMatched(source.Value(Literal), Value); }