feat: Impl BooleanExpressions
This commit is contained in:
1 parent
ca95ab7a24
commit
094ea67e43
38 files changed
+3092
-503
No files matched your search
@@ -1,18 +1,15 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
namespace BCG;
|
||||
|
||||
using BCG.Utilities;
|
||||
using Bts.BooleanExpressions;
|
||||
|
||||
namespace BCG
|
||||
{
|
||||
public class BooleanExpressionFilter : IStreamFilter
|
||||
{
|
||||
public BooleanExpressionFilter(string exp)
|
||||
{myInterpreter = new BooleanExpressionsInterpreter(exp);}
|
||||
using Spark.Core.Collections;
|
||||
|
||||
public bool filter(IBlueRow dr)
|
||||
{ return myInterpreter.eval(dr); }
|
||||
public class BooleanExpressionFilter : IStreamFilter {
|
||||
IBooleanExpression myInterpreter;
|
||||
|
||||
private BooleanExpressionsInterpreter myInterpreter;
|
||||
}
|
||||
public BooleanExpressionFilter(string exp) =>
|
||||
myInterpreter = BooleanExpressionParser.Parse(exp);
|
||||
|
||||
public bool filter(IBlueRow dr) =>
|
||||
myInterpreter.Evaluate(GenericDictionaryWrapper.Create<string, object?>(dr));
|
||||
}
|
||||
Reference in new issue
Block a user