14 lines
424 B
C#
14 lines
424 B
C#
namespace Bts.BooleanExpressions;
|
|
|
|
class BinaryOperator : IBinaryOperator {
|
|
readonly Func<IArgument?, IArgument?, IDictionary<string, object?>, bool> op;
|
|
|
|
public BinaryOperator(
|
|
Func<IArgument?, IArgument?, IDictionary<string, object?>, bool> op) =>
|
|
this.op = op;
|
|
|
|
public bool Evaluate(
|
|
IArgument? arg1, IArgument? arg2, IDictionary<string, object?> bindings) =>
|
|
op(arg1, arg2, bindings);
|
|
}
|